Commit 97215414 authored by Stephen Rothwell's avatar Stephen Rothwell Committed by Linus Torvalds

[PATCH] ppc64: remove serialPortAddr from the naca

The serialPortAddr field of the naca was only being used locally, remove
it.
Signed-off-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent e6b39a5e
......@@ -75,7 +75,8 @@ extern void maple_calibrate_decr(void);
extern void maple_pci_init(void);
extern void maple_pcibios_fixup(void);
extern int maple_pci_get_legacy_ide_irq(struct pci_dev *dev, int channel);
extern void generic_find_legacy_serial_ports(unsigned int *default_speed);
extern void generic_find_legacy_serial_ports(u64 *physport,
unsigned int *default_speed);
static void maple_restart(char *cmd)
......@@ -129,6 +130,7 @@ void __init maple_setup_arch(void)
static void __init maple_init_early(void)
{
unsigned int default_speed;
u64 physport;
DBG(" -> maple_init_early\n");
......@@ -138,14 +140,14 @@ static void __init maple_init_early(void)
hpte_init_native();
/* Find the serial port */
generic_find_legacy_serial_ports(&default_speed);
generic_find_legacy_serial_ports(&physport, &default_speed);
DBG("naca->serialPortAddr: %lx\n", (long)naca->serialPortAddr);
DBG("phys port addr: %lx\n", (long)physport);
if (naca->serialPortAddr) {
if (physport) {
void *comport;
/* Map the uart for udbg. */
comport = (void *)__ioremap(naca->serialPortAddr, 16, _PAGE_NO_CACHE);
comport = (void *)__ioremap(physport, 16, _PAGE_NO_CACHE);
udbg_init_uart(comport, default_speed);
ppc_md.udbg_putc = udbg_putc;
......
......@@ -82,7 +82,8 @@ extern void pSeries_get_rtc_time(struct rtc_time *rtc_time);
extern int pSeries_set_rtc_time(struct rtc_time *rtc_time);
extern void find_udbg_vterm(void);
extern void SystemReset_FWNMI(void), MachineCheck_FWNMI(void); /* from head.S */
extern void generic_find_legacy_serial_ports(unsigned int *default_speed);
extern void generic_find_legacy_serial_ports(u64 *physport,
unsigned int *default_speed);
int fwnmi_active; /* TRUE if an FWNMI handler is present */
......@@ -345,6 +346,7 @@ static void __init pSeries_init_early(void)
void *comport;
int iommu_off = 0;
unsigned int default_speed;
u64 physport;
DBG(" -> pSeries_init_early()\n");
......@@ -358,13 +360,13 @@ static void __init pSeries_init_early(void)
get_property(of_chosen, "linux,iommu-off", NULL));
}
generic_find_legacy_serial_ports(&default_speed);
generic_find_legacy_serial_ports(&physport, &default_speed);
if (systemcfg->platform & PLATFORM_LPAR)
find_udbg_vterm();
else if (naca->serialPortAddr) {
else if (physport) {
/* Map the uart for udbg. */
comport = (void *)__ioremap(naca->serialPortAddr, 16, _PAGE_NO_CACHE);
comport = (void *)__ioremap(physport, 16, _PAGE_NO_CACHE);
udbg_init_uart(comport, default_speed);
ppc_md.udbg_putc = udbg_putc;
......
......@@ -1154,7 +1154,8 @@ __setup("decr_overclock=", set_decr_overclock );
static struct plat_serial8250_port serial_ports[MAX_LEGACY_SERIAL_PORTS+1];
static unsigned int old_serial_count;
void __init generic_find_legacy_serial_ports(unsigned int *default_speed)
void __init generic_find_legacy_serial_ports(u64 *physport,
unsigned int *default_speed)
{
struct device_node *np;
u32 *sizeprop;
......@@ -1172,7 +1173,7 @@ void __init generic_find_legacy_serial_ports(unsigned int *default_speed)
DBG(" -> generic_find_legacy_serial_port()\n");
naca->serialPortAddr = 0;
*physport = 0;
if (default_speed)
*default_speed = 0;
......@@ -1294,7 +1295,7 @@ void __init generic_find_legacy_serial_ports(unsigned int *default_speed)
io_base = (io_base << 32) | rangesp[4];
}
if (io_base != 0) {
naca->serialPortAddr = io_base + reg->address;
*physport = io_base + reg->address;
if (default_speed && spd)
*default_speed = *spd;
}
......
......@@ -22,7 +22,6 @@ struct naca_struct {
u64 debug_switch; /* Debug print control 0x20 */
u64 banner; /* Ptr to banner string 0x28 */
u64 log; /* Ptr to log buffer 0x30 */
u64 serialPortAddr; /* Phy addr of serial port 0x38 */
};
extern struct naca_struct *naca;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment