[PATCH][RFC] remove serialPortAddr from the naca
Stephen Rothwell
sfr at canb.auug.org.au
Sat Dec 11 01:05:48 EST 2004
Hi all,
This patch just removes serialPortAddr from the naca. This patch
has not even been compiled, but seems straight forward.
--
Cheers,
Stephen Rothwell sfr at canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
diff -ruN linus-bk-naca.5/arch/ppc64/kernel/maple_setup.c linus-bk-naca.6/arch/ppc64/kernel/maple_setup.c
--- linus-bk-naca.5/arch/ppc64/kernel/maple_setup.c 2004-12-10 16:26:51.000000000 +1100
+++ linus-bk-naca.6/arch/ppc64/kernel/maple_setup.c 2004-12-11 00:53:42.000000000 +1100
@@ -75,7 +75,8 @@
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 @@
static void __init maple_init_early(void)
{
unsigned int default_speed;
+ u64 physport;
DBG(" -> maple_init_early\n");
@@ -138,14 +140,14 @@
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;
diff -ruN linus-bk-naca.5/arch/ppc64/kernel/pSeries_setup.c linus-bk-naca.6/arch/ppc64/kernel/pSeries_setup.c
--- linus-bk-naca.5/arch/ppc64/kernel/pSeries_setup.c 2004-12-10 16:26:51.000000000 +1100
+++ linus-bk-naca.6/arch/ppc64/kernel/pSeries_setup.c 2004-12-11 00:56:42.000000000 +1100
@@ -81,7 +81,8 @@
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 */
@@ -341,6 +342,7 @@
void *comport;
int iommu_off = 0;
unsigned int default_speed;
+ u64 physport;
DBG(" -> pSeries_init_early()\n");
@@ -354,13 +356,13 @@
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;
diff -ruN linus-bk-naca.5/arch/ppc64/kernel/setup.c linus-bk-naca.6/arch/ppc64/kernel/setup.c
--- linus-bk-naca.5/arch/ppc64/kernel/setup.c 2004-12-10 16:26:51.000000000 +1100
+++ linus-bk-naca.6/arch/ppc64/kernel/setup.c 2004-12-11 00:59:30.000000000 +1100
@@ -1154,7 +1154,8 @@
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 @@
DBG(" -> generic_find_legacy_serial_port()\n");
- naca->serialPortAddr = 0;
+ *physport = 0;
if (default_speed)
*default_speed = 0;
@@ -1294,7 +1295,7 @@
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;
}
diff -ruN linus-bk-naca.5/include/asm-ppc64/naca.h linus-bk-naca.6/include/asm-ppc64/naca.h
--- linus-bk-naca.5/include/asm-ppc64/naca.h 2004-12-10 18:42:14.000000000 +1100
+++ linus-bk-naca.6/include/asm-ppc64/naca.h 2004-12-11 00:03:55.000000000 +1100
@@ -22,7 +22,6 @@
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;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://ozlabs.org/pipermail/linuxppc64-dev/attachments/20041211/3edfb1a8/attachment.pgp
More information about the Linuxppc64-dev
mailing list