From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Andrew Morton <akpm@osdl.org>
Cc: linuxppc64-dev@ozlabs.org, linux-kernel@vger.kernel.org
Subject: [PATCH 6/11] PPC64: remove serialPortAddr from the naca
Date: Tue, 4 Jan 2005 15:27:05 +1100 [thread overview]
Message-ID: <20050104152705.6030abc5.sfr@canb.auug.org.au> (raw)
In-Reply-To: <20050104152340.67219ccf.sfr@canb.auug.org.au>
[-- Attachment #1: Type: text/plain, Size: 4731 bytes --]
Hi Andrew,
The serialPortAddr field of the naca was only being used locally, remove
it.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
--
Cheers,
Stephen Rothwell sfr@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-31 14:53:21.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-31 15:22:17.000000000 +1100
+++ linus-bk-naca.6/arch/ppc64/kernel/pSeries_setup.c 2004-12-31 15:35:13.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 */
@@ -344,6 +345,7 @@
void *comport;
int iommu_off = 0;
unsigned int default_speed;
+ u64 physport;
DBG(" -> pSeries_init_early()\n");
@@ -357,13 +359,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-31 16:24:54.000000000 +1100
+++ linus-bk-naca.6/arch/ppc64/kernel/setup.c 2004-12-31 16:23: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;
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2005-01-04 5:08 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-04 3:53 PPC64 cleanups 0/11 Stephen Rothwell
2005-01-04 4:04 ` [PATCH 1/11] PPC64: Consolidate cache sizing variables Stephen Rothwell
2005-01-04 4:08 ` [PATCH 2/11] PPC64: remove the page table size from the naca Stephen Rothwell
2005-01-04 4:12 ` [PATCH 3/11] PPC64: remove interrupt_controller from naca Stephen Rothwell
2005-01-04 4:19 ` [PATCH 4/11] PPC64: remove /proc/ppc64/{naca,paca/xx} Stephen Rothwell
2005-01-04 4:23 ` [PATCH 5/11] PPC64: remove the paca pointer form the naca Stephen Rothwell
2005-01-04 4:27 ` Stephen Rothwell [this message]
2005-01-04 4:31 ` [PATCH 7/11] PPC64: remove debug_switch from " Stephen Rothwell
2005-01-04 4:34 ` [PATCH 8/11] PPC64: remove the naca from all but iSeries Stephen Rothwell
2005-01-04 4:37 ` [PATCH 9/11] PPC64: use xPMCRegsInUse Stephen Rothwell
2005-01-04 4:40 ` [PATCH 10/11] PPC64: move the lppaca defining header file Stephen Rothwell
2005-01-04 4:43 ` [PATCH 11/11] PPC64: remove StudlyCaps from lppaca structure Stephen Rothwell
2005-01-04 11:58 ` [PATCH] PPC64: use c99 initializers Stephen Rothwell
2005-01-04 12:05 ` [PATCH] PPC64: tidy up the htab_data structure Stephen Rothwell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050104152705.6030abc5.sfr@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc64-dev@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®