* [PATCH] ppc32 8xx: m8xx_pcmcia_set_iomap() must support MAP_AUTOSZ
From: Marcelo Tosatti @ 2005-11-05 15:07 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linux-ppc-embedded
From: Vitaly Bordug <vbordug@ru.mvista.com>
This fixes misconfiguration that could result in odd work of some old CF
cards.
Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
Signed-off-by: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
diff --git a/drivers/pcmcia/m8xx_pcmcia.c b/drivers/pcmcia/m8xx_pcmcia.c
--- a/drivers/pcmcia/m8xx_pcmcia.c
+++ b/drivers/pcmcia/m8xx_pcmcia.c
@@ -1041,8 +1041,7 @@ static int m8xx_set_io_map(struct pcmcia
if(io->flags & MAP_WRPROT)
reg |= M8XX_PCMCIA_POR_WRPROT;
- /*if(io->flags & (MAP_16BIT | MAP_AUTOSZ))*/
- if(io->flags & MAP_16BIT)
+ if(io->flags & (MAP_16BIT | MAP_AUTOSZ))
reg |= M8XX_PCMCIA_POR_16BIT;
if(io->flags & MAP_ACTIVE)
^ permalink raw reply
* [PATCH] ppc32 8xx: MPC8xx PCMCIA update
From: Marcelo Tosatti @ 2005-11-05 15:03 UTC (permalink / raw)
To: Paul Mackerras; +Cc: Dominik Brodowski, linux-ppc-embedded
Hi Paul,
The following patch updates the MPC8xx PCMCIA driver:
- Kconfig entry: dependency on 8xx
- Makefile: fix whitespace breakage
- m8xx_pcmcia.c:
- asm/segment.h is gone
- use generic PCMCIA suspend/resume methods
Signed-off-by: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
diff -u ../git/linux-2.6/drivers/pcmcia/Kconfig linux-2.6-git-wednov02/drivers/pcmcia/Kconfig
--- ../git/linux-2.6/drivers/pcmcia/Kconfig 2005-11-01 07:58:24.000000000 -0600
+++ linux-2.6-git-wednov02/drivers/pcmcia/Kconfig 2005-11-03 05:52:05.000000000 -0600
@@ -156,7 +156,7 @@
config PCMCIA_M8XX
tristate "MPC8xx PCMCIA support"
- depends on PCMCIA && PPC
+ depends on PCMCIA && PPC && 8xx
select PCCARD_NONSTATIC
help
Say Y here to include support for PowerPC 8xx series PCMCIA
diff -u ../git/linux-2.6/drivers/pcmcia/Makefile linux-2.6-git-wednov02/drivers/pcmcia/Makefile
--- ../git/linux-2.6/drivers/pcmcia/Makefile 2005-11-01 07:58:24.000000000 -0600
+++ linux-2.6-git-wednov02/drivers/pcmcia/Makefile 2005-11-03 05:50:16.000000000 -0600
@@ -25,7 +25,7 @@
obj-$(CONFIG_I82365) += i82365.o
obj-$(CONFIG_I82092) += i82092.o
obj-$(CONFIG_TCIC) += tcic.o
-obj-$(CONFIG_PCMCIA_M8XX) += m8xx_pcmcia.o
+obj-$(CONFIG_PCMCIA_M8XX) += m8xx_pcmcia.o
obj-$(CONFIG_HD64465_PCMCIA) += hd64465_ss.o
obj-$(CONFIG_PCMCIA_SA1100) += sa11xx_core.o sa1100_cs.o
obj-$(CONFIG_PCMCIA_SA1111) += sa11xx_core.o sa1111_cs.o
@@ -47,10 +47,10 @@
au1x00_ss-$(CONFIG_MIPS_PB1500) += au1000_pb1x00.o
au1x00_ss-$(CONFIG_MIPS_DB1000) += au1000_db1x00.o
au1x00_ss-$(CONFIG_MIPS_DB1100) += au1000_db1x00.o
-au1x00_ss-$(CONFIG_MIPS_DB1200) += au1000_db1x00.o
+au1x00_ss-$(CONFIG_MIPS_DB1200) += au1000_db1x00.o
au1x00_ss-$(CONFIG_MIPS_DB1500) += au1000_db1x00.o
au1x00_ss-$(CONFIG_MIPS_DB1550) += au1000_db1x00.o
-au1x00_ss-$(CONFIG_MIPS_XXS1500) += au1000_xxs1500.o
+au1x00_ss-$(CONFIG_MIPS_XXS1500) += au1000_xxs1500.o
sa1111_cs-y += sa1111_generic.o
sa1111_cs-$(CONFIG_ASSABET_NEPONSET) += sa1100_neponset.o
diff -u ../git/linux-2.6/drivers/pcmcia/m8xx_pcmcia.c linux-2.6-git-wednov02/drivers/pcmcia/m8xx_pcmcia.c
--- ../git/linux-2.6/drivers/pcmcia/m8xx_pcmcia.c 2005-11-01 07:58:24.000000000 -0600
+++ linux-2.6-git-wednov02/drivers/pcmcia/m8xx_pcmcia.c 2005-11-03 05:47:57.000000000 -0600
@@ -39,7 +39,6 @@
#include <asm/io.h>
#include <asm/bitops.h>
-#include <asm/segment.h>
#include <asm/system.h>
#include <linux/kernel.h>
@@ -50,6 +49,7 @@
#include <linux/ioport.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
+#include <linux/platform_device.h>
#include <asm/mpc8xx.h>
#include <asm/8xx_immap.h>
@@ -546,29 +546,11 @@
free_irq(pcmcia_schlvl, NULL);
}
-/* copied from tcic.c */
-
-static int m8xx_drv_suspend(struct device *dev, pm_message_t state, u32 level)
-{
- int ret = 0;
- if (level == SUSPEND_SAVE_STATE)
- ret = pcmcia_socket_dev_suspend(dev, state);
- return ret;
-}
-
-static int m8xx_drv_resume(struct device *dev, u32 level)
-{
- int ret = 0;
- if (level == RESUME_RESTORE_STATE)
- ret = pcmcia_socket_dev_resume(dev);
- return ret;
-}
-
static struct device_driver m8xx_driver = {
.name = "m8xx-pcmcia",
.bus = &platform_bus_type,
- .suspend = m8xx_drv_suspend,
- .resume = m8xx_drv_resume,
+ .suspend = pcmcia_socket_dev_suspend,
+ .resume = pcmcia_socket_dev_resume,
};
static struct platform_device m8xx_device = {
^ permalink raw reply
* [PATCH] ppc32 8xx: fix m8xx_wdt acessor macro update
From: Marcelo Tosatti @ 2005-11-05 15:01 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linux-ppc-embedded
Paul,
The following patch against m8xx_wdt.c adds <asm/io.h> (required for
out,in_be32/16) and fixes syntatic problems introduced with the IO
accessor macro update.
Signed-off-by: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
--- ../git/linux-2.6/arch/ppc/syslib/m8xx_wdt.c 2005-11-01 07:58:12.000000000 -0600
+++ linux-2.6-git-wednov02/arch/ppc/syslib/m8xx_wdt.c 2005-11-05 13:14:53.545580928 -0600
@@ -14,6 +14,7 @@
#include <linux/irq.h>
#include <linux/kernel.h>
#include <linux/sched.h>
+#include <asm/io.h>
#include <asm/8xx_immap.h>
#include <syslib/m8xx_wdt.h>
@@ -29,8 +30,8 @@
{
volatile immap_t *imap = (volatile immap_t *)IMAP_ADDR;
- out_be16(imap->im_siu_conf.sc_swsr, 0x556c); /* write magic1 */
- out_be16(imap->im_siu_conf.sc_swsr, 0xaa39); /* write magic2 */
+ out_be16(&imap->im_siu_conf.sc_swsr, 0x556c); /* write magic1 */
+ out_be16(&imap->im_siu_conf.sc_swsr, 0xaa39); /* write magic2 */
}
static irqreturn_t m8xx_wdt_interrupt(int irq, void *dev, struct pt_regs *regs)
@@ -39,7 +40,7 @@
m8xx_wdt_reset();
- out_be16(imap->im_sit.sit_piscr, in_be16(imap->im_sit.sit_piscr | PISCR_PS)); /* clear irq */
+ out_be16(&imap->im_sit.sit_piscr, in_be16(&imap->im_sit.sit_piscr) | PISCR_PS); /* clear irq */
return IRQ_HANDLED;
}
@@ -51,7 +52,7 @@
u32 sypcr;
u32 pitrtclk;
- sypcr = in_be32(imap->im_siu_conf.sc_sypcr);
+ sypcr = in_be32(&imap->im_siu_conf.sc_sypcr);
if (!(sypcr & 0x04)) {
printk(KERN_NOTICE "m8xx_wdt: wdt disabled (SYPCR: 0x%08X)\n",
@@ -87,9 +88,9 @@
else
pitc = pitrtclk * wdt_timeout / binfo->bi_intfreq / 2;
- out_be32(imap->im_sit.sit_pitc, pitc << 16);
+ out_be32(&imap->im_sit.sit_pitc, pitc << 16);
- out_be16(imap->im_sit.sit_piscr, (mk_int_int_mask(PIT_INTERRUPT) << 8) | PISCR_PIE | PISCR_PTE);
+ out_be16(&imap->im_sit.sit_piscr, (mk_int_int_mask(PIT_INTERRUPT) << 8) | PISCR_PIE | PISCR_PTE);
if (setup_irq(PIT_INTERRUPT, &m8xx_wdt_irqaction))
panic("m8xx_wdt: error setting up the watchdog irq!");
^ permalink raw reply
* MPC5200 I2S driver
From: Frank Bennett @ 2005-11-05 19:22 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 662 bytes --]
Hi Hans, Eric:
I would be interested in getting any driver code
examples for Bestcomm/PSC6/CODEC for the mpc5200
as well.
I am developing a couple of drivers: one a Data
Acquisition driver for SPI based AD7683 SAR ADC
on PSC6/codec and a LCD user interface on PSC3/SPI
using the DENX Linux distribution. Is arch/ppc/5xxx_io/i2s.c
a good example of a Bestcomm, Codec, non Ethernet
example?
Thanks to you guys and Wolfgang for you contributions
to this thread discussion.
*/Frank Bennett
President
/*Mathegraphics,LLC
613 Bentley Pl
Fort Collins,CO 80526
www.mathegraphics.com <http://www.mathegraphics.com>
bennett78@digis.net <mailto:bennett78@digis.net>
[-- Attachment #2: Type: text/html, Size: 1145 bytes --]
^ permalink raw reply
* Re: [PATCH 2.6.14] ppc32: Allow for bigger compressed kernels
From: Andrew Morton @ 2005-11-05 17:56 UTC (permalink / raw)
To: Tom Rini; +Cc: linuxppc-dev
In-Reply-To: <20051105175020.GZ3839@smtp.west.cox.net>
Tom Rini <trini@kernel.crashing.org> wrote:
>
> If you
> throw out an interm tree somewhere hopefully Matt can do a quick boot
> test on some 4xx board (I unfortunaly don't have one).
OK. I hope to have -mm1 out this weekend. An interim tree at present
probably won't even vaguely compile. Sigh.
^ permalink raw reply
* [PATCH] Fix i8259 cascade IRQ
From: David Woodhouse @ 2005-11-05 17:54 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
setup_irq() aborts immediately if there's no handler for the IRQ in
question. So i8259_init() should set up its handlers before trying to
set up the cascade on IRQ 2.
With this and the patch I sent a few days ago to fix initrd on ppc32, my
Pegasos now runs the arch/powerpc kernel.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
diff --git a/arch/powerpc/sysdev/i8259.c b/arch/powerpc/sysdev/i8259.c
index 90bce6e..b7ac32f 100644
--- a/arch/powerpc/sysdev/i8259.c
+++ b/arch/powerpc/sysdev/i8259.c
@@ -207,6 +207,9 @@ void __init i8259_init(unsigned long int
spin_unlock_irqrestore(&i8259_lock, flags);
+ for (i = 0; i < NUM_ISA_INTERRUPTS; ++i)
+ irq_desc[offset + i].handler = &i8259_pic;
+
/* reserve our resources */
setup_irq(offset + 2, &i8259_irqaction);
request_resource(&ioport_resource, &pic1_iores);
@@ -216,6 +219,4 @@ void __init i8259_init(unsigned long int
if (intack_addr != 0)
pci_intack = ioremap(intack_addr, 1);
- for (i = 0; i < NUM_ISA_INTERRUPTS; ++i)
- irq_desc[offset + i].handler = &i8259_pic;
}
--
dwmw2
^ permalink raw reply related
* Re: [PATCH 2.6.14] ppc32: Allow for bigger compressed kernels
From: Tom Rini @ 2005-11-05 17:50 UTC (permalink / raw)
To: Andrew Morton; +Cc: linuxppc-dev
In-Reply-To: <20051104211605.2ccffef5.akpm@osdl.org>
On Fri, Nov 04, 2005 at 09:16:05PM -0800, Andrew Morton wrote:
> Tom Rini <trini@kernel.crashing.org> wrote:
> >
> > The ppc (not ppc64) boot loader (zimage wrapper) has a hard coded limit of
> > 4 MB on the size of an uncompressed kernel it can boot. The boot loader has
> > been changed to dynamically determine the largest possible kernel and
> > support it. Relocating the boot loader to a higher address (currently
> > located at 8 MB) will provide additional room.
> >
>
> I'm getting an unpleasant reject here from Matt's
> ppc32-cleanup-amcc-ppc40x-eval-boards-to-support-u-boot.patch. In
> decompress_kernel he has added this ifdef:
>
> @@ -164,7 +172,9 @@ decompress_kernel(unsigned long load_add
> puts(" "); puthex((unsigned long)(&__ramdisk_end));puts("\n");
> }
>
> +#ifndef CONFIG_40x /* don't overwrite the 40x image located at 0x00400000! */
> avail_ram = (char *)0x00400000;
> +#endif
> end_avail = (char *)0x00800000;
> puts("avail ram: "); puthex((unsigned long)avail_ram); puts(" ");
> puthex((unsigned long)end_avail); puts("\n");
>
>
> Which would appear to leave avail_ram at zero on CONFIG_40x. There's no
> mention in the changelog that this was the intent, so I dunno what's going
> on.
It's very confusing code, I'll agree, and it's not helped by a
long-missing cleanup. Going back to
http://linux.bkbits.net:8080/linux-2.6/diffs/arch/ppc/boot/simple/misc.c@1.3?nav=index.html|src/|src/arch/ppc/boot/simple/|hist/arch/ppc/boot/simple/misc.c
we got to the point of doing:
avail_ram = good aligned end of images value;
... do nothing to or with avail_ram ...
avail_ram = 4MB;
What Mark's patch does is get us to use and aligned value again. So if
I read everything right we should just be able to drop that hunk of
Matt's patch as we really won't be overwriting anyones image. If you
throw out an interm tree somewhere hopefully Matt can do a quick boot
test on some 4xx board (I unfortunaly don't have one).
--
Tom Rini
http://gate.crashing.org/~trini/
^ permalink raw reply
* Re: Re: Help needed Linux-2.6 - MPC8540
From: info @ 2005-11-05 15:14 UTC (permalink / raw)
To: linuxppc-embedded
Andy, Kumar
The problems is solved, the reason is not PHY driver but u-boot. I use u-boot-1.1.1 from GDAtech, I think it has some bugs on the PHY setup even if it is working OK with kernel-2.4.x. When I update to u-boot-1.1.3, every thing is OK.
>Andy, Kumar
>
>Thank you for your help!
>GDAtech only give me linux-2.4.27 binary file for RMC-G8500 card, I try to port 2.6.13 for that card myself.
>
>Today, I download linux-2.6.13.tar.bz2 and patch-2.6.14-rc5.bz2 from kernel.org.
>I download http://lwn.net/Articles/146253/ "Patch: Gianfar PHY Layer Update".
>I download http://ozlabs.org/pipermail/linuxppc-embedded/2005-October/020593.html "[PATCH] 85xx PHY Platform Update"
>I patch and build them together get a linux 2.6.14-rc5 for MPC8540, try it on RMC-G8500 card
>
>U-Boot 1.1.1 (Aug 10 2004 - 11:01:21)
>
>Motorola PowerPC ProcessorID=00000000 Rev. PVR=80200020
>Board: GDA Technologies RMC-G8500 [PowerQUICC III]
> CPU: 825 MHz
> CCB: 330 MHz
> DDR: 165 MHz
> LBC: 82 MHz
>L1 D-cache 32KB, L1 I-cache 32KB enabled.
>I2C: ready
>DRAM: 256 MB
>8540 in PCI Host Mode.
>8540 is the PCI Arbiter.
>FLASH: 8 MB
>L2 cache enabled: 256KB
>In: serial
>Out: serial
>Err: serial
>Net: MOTO ETHERNET
>Hit any key to stop autoboot: 0
>RMCG8500#>tftp 200000 uImage; tftp 400000 your.ramdisk.u-boot; bootm 200000 400000
>Using MOTO ETHERNET device
>TFTP from server 192.96.134.135; our IP address is 192.96.134.136
>Filename 'uImage'.
>Load address: 0x200000
>Loading: #################################################################
> #################################################################
> #################################################################
> ################################
>done
>Bytes transferred = 1159376 (11b0d0 hex)
>Using MOTO ETHERNET device
>TFTP from server 192.96.134.135; our IP address is 192.96.134.136
>Filename 'your.ramdisk.u-boot'.
>Load address: 0x400000
>Loading: #################################################################
> #################################################################
> #################################################################
> #################################################################
> #################################################################
> #################################################################
> #################################################################
> #################################################################
> #################################################################
> #################################################################
> ########################################
>done
>Bytes transferred = 3530818 (35e042 hex)
>## Booting image at 00200000 ...
> Image Name: Linux-2.6.14-rc5
> Image Type: PowerPC Linux Kernel Image (gzip compressed)
> Data Size: 1159312 Bytes = 1.1 MB
> Load Address: 00000000
> Entry Point: 00000000
> Verifying Checksum ... OK
> Uncompressing Kernel Image ... OK
>## Loading RAMDisk Image at 00400000 ...
> Image Name: zzz ppc ramdisk
> Image Type: PowerPC Linux RAMDisk Image (gzip compressed)
> Data Size: 3530754 Bytes = 3.4 MB
> Load Address: 00000000
> Entry Point: 00000000
> Verifying Checksum ... OK
> Loading Ramdisk to 0fc54000, end 0ffb2002 ... OK
>Memory CAM mapping: CAM0=256Mb, CAM1=0Mb, CAM2=0Mb residual: 0Mb
>Linux version 2.6.14-rc5 (root@ppclinux) (gcc version 3.3.3 (Yellow Dog Linux 3.3.3-16.ydl.4)) #1 Mon Oct 24 13:22:56 EDT 2005
>Built 1 zonelists
>Kernel command line: console=ttyS0,115200 root=/dev/ram rw doPci=1
>OpenPIC Version 1.2 (1 CPUs and 60 IRQ sources) at fcfbb000
>PID hash table entries: 2048 (order: 11, 32768 bytes)
>Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
>Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
>Memory: 253440k available (1904k kernel code, 516k data, 132k init, 0k highmem)
>Mount-cache hash table entries: 512
>checking if image is initramfs...it isn't (no cpio magic); looks like an initrd
>softlockup thread 0 started up.
>Freeing initrd memory: 3448k freed
>NET: Registered protocol family 16
>PCI: Probing PCI hardware
>Generic PHY: Registered new driver
>SCSI subsystem initialized
>Generic RTC Driver v1.07
>i8042.c: i8042 controller self test timeout.
>Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
>ttyS0 at MMIO 0xfdf04500 (irq = 26) is a 16550A
>ttyS1 at MMIO 0xfdf04600 (irq = 26) is a 16550A
>io scheduler noop registered
>io scheduler anticipatory registered
>io scheduler deadline registered
>io scheduler cfq registered
>RAMDISK driver initialized: 16 RAM disks of 32768K size 1024 blocksize
>loop: loaded (max 8 devices)
>Gianfar MII Bus: probed
>
>
>!!STOP HERE
>
>
>
>>
>>On Oct 23, 2005, at 10:39, info wrote:
>>
>>> Junita
>>>
>>> Sorry to disturbed you. I find your question in the http://
>>> ozlabs.org mail list.
>>> Have you fixed the bug in gianfar_phy.c?
>>> tempval = gfar_read(&priv-> regs-> dmactrl);
>>> tempval |= (DMACTRL_GRS | DMACTRL_GTS);
>>> gfar_write(&priv-> regs-> dmactrl, tempval);
>>>
>>> while (!(gfar_read(&priv-> regs-> ievent) & (IEVENT_GRSC |
>>> IEVENT_GTSC)))
>>> cpu_relax();
>>>
>>> /* Reset MAC layer */
>>> gfar_write(&priv-> regs-> maccfg1, MACCFG1_SOFT_RESET);
>>
>>
>>I'm a bit confused by the statement above. The code you present is
>>from gianfar.c, and is certainly not a bug. It is possible you are
>>using an older version of the code, which has a bug, which is fixed
>>by adding these lines above the code you show:
>>
>> tempval = gfar_read(&priv->regs->dmactrl);
>> tempval &= ~(DMACTRL_GRS | DMACTRL_GTS);
>> gfar_write(&priv->regs->dmactrl, tempval);
>>
>>This fixes a problem where setting GRS and GTS when they're already
>>set doesn't initiate the graceful stop. But if you are using 2.6.13,
>>you should have this fix. I suspect that, like I told Junita, you
>>need to make sure the platform code has the right CCSRBAR value set up.
>>
>>>
>>> I buy a RMC-G8500 card from GDAtech, I try to build linux-2.6.13.4
>>> from kernel.org and meet the same problems as you had. I test the
>>> same code on freescale 8540_ADS board, it is good.Can you share
>>> some infomation of your progress?
>>
>>
>>I'm not familiar with this card. Are you sure there's support for it
>>in your source tree?
>>
>>
>>Andy Fleming
>>
>>.
>
>
>>You need the corresponding patches that are in the netdev tree for
>>the PHY subsystem.
>
>>- kumar
>
>>On Oct 24, 2005, at 9:49 AM, info wrote:
>
>> Andy, Kumar
>>
>> I try this patch for RMC-G8500 from GDAtech, error message below:
>> ----------------------------------------------------------------------
>> -----------
>> [root@ppclinux linux-2.6.13]# make uImage
>> CHK include/linux/version.h
>> CHK include/linux/compile.h
>> CHK usr/initramfs_list
>> CC drivers/net/gianfar.o
>> drivers/net/gianfar.c: In function `gfar_probe':
>> drivers/net/gianfar.c:217: error: structure has no member named
>> `phy_reg_addr'
>> drivers/net/gianfar.c: In function `init_phy':
>> drivers/net/gianfar.c:452: error: structure has no member named
>> `phyid'
>> drivers/net/gianfar.c: In function `stop_gfar':
>> drivers/net/gianfar.c:636: error: structure has no member named
>> `interruptPHY'
>> drivers/net/gianfar.c: In function `gfar_phy_startup_timer':
>> drivers/net/gianfar.c:1818: error: structure has no member named
>> `interruptPHY'
>> drivers/net/gianfar.c:1826: error: structure has no member named
>> `interruptPHY'
>> make[2]: *** [drivers/net/gianfar.o] Error 1
>> make[1]: *** [drivers/net] Error 2
>> make: *** [drivers] Error 2
>>
>> ----------------------------------------------------------------------
>> -----------
>> because???
>>
>> /* Internal interrupts are all Level Sensitive, and Positive
>> Polarity */
>> diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h
>> --- a/include/linux/fsl_devices.h
>> +++ b/include/linux/fsl_devices.h
>> @@ -47,14 +47,19 @@
>> struct gianfar_platform_data {
>> /* device specific information */
>> u32 device_flags;
>> - u32 phy_reg_addr;
>>
>> /* board specific information */
>> u32 board_flags;
>> - u32 phy_flags;
>> - u32 phyid;
>> - u32 interruptPHY;
>> + const char *bus_id;
>> u8 mac_addr[6];
>> +};
>> +
>>
>>
>> ----------------------------------------------------------------------
>> ---------------------
>> <This patch updates the 85xx platform code to support the new PHY
>> Layer.
>> <
>> <Signed-off-by: Andy Fleming <afleming at freescale.com>
>> <Signed-off-by: Kumar Gala <Kumar.gala at freescale.com>
>> <
>> <
>> <diff --git a/arch/ppc/platforms/85xx/mpc8540_ads.c b/arch/ppc/
>> platforms/85xx/mpc8540_ads.c
>> <--- a/arch/ppc/platforms/85xx/mpc8540_ads.c
>> <+++ b/arch/ppc/platforms/85xx/mpc8540_ads.c
>> <@@ -53,6 +53,10 @@
>> <
>> < #include <syslib/ppc85xx_setup.h>
>> <
>> <+static const char *GFAR_PHY_0 = "phy0:0";
>> <+static const char *GFAR_PHY_1 = "phy0:1";
>> <+static const char *GFAR_PHY_3 = "phy0:3";
>> <+
>> < /*
>> **********************************************************************
>> **
>> < *
>> < * Setup the architecture
>> <@@ -64,6 +68,7 @@ mpc8540ads_setup_arch(void)
>>
>>
>>
>> _______________________________________________
>> Linuxppc-embedded mailing list
>> Linuxppc-embedded@ozlabs.org
>> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>>
>
^ permalink raw reply
* unsubscribe
From: Geert Janssens @ 2005-11-05 10:13 UTC (permalink / raw)
To: Linuxppc-dev
^ permalink raw reply
* Re: [PATCH 2.6.14] ppc32: Allow for bigger compressed kernels
From: Andrew Morton @ 2005-11-05 5:16 UTC (permalink / raw)
To: Tom Rini; +Cc: linuxppc-dev
In-Reply-To: <20051103183256.GJ3839@smtp.west.cox.net>
Tom Rini <trini@kernel.crashing.org> wrote:
>
> The ppc (not ppc64) boot loader (zimage wrapper) has a hard coded limit of
> 4 MB on the size of an uncompressed kernel it can boot. The boot loader has
> been changed to dynamically determine the largest possible kernel and
> support it. Relocating the boot loader to a higher address (currently
> located at 8 MB) will provide additional room.
>
I'm getting an unpleasant reject here from Matt's
ppc32-cleanup-amcc-ppc40x-eval-boards-to-support-u-boot.patch. In
decompress_kernel he has added this ifdef:
@@ -164,7 +172,9 @@ decompress_kernel(unsigned long load_add
puts(" "); puthex((unsigned long)(&__ramdisk_end));puts("\n");
}
+#ifndef CONFIG_40x /* don't overwrite the 40x image located at 0x00400000! */
avail_ram = (char *)0x00400000;
+#endif
end_avail = (char *)0x00800000;
puts("avail ram: "); puthex((unsigned long)avail_ram); puts(" ");
puthex((unsigned long)end_avail); puts("\n");
Which would appear to leave avail_ram at zero on CONFIG_40x. There's no
mention in the changelog that this was the intent, so I dunno what's going
on.
But your change does appear to conflict in intent with Matt's patch (below),
so... help!
>
> diff --git a/arch/ppc/boot/simple/misc.c b/arch/ppc/boot/simple/misc.c
> --- a/arch/ppc/boot/simple/misc.c
> +++ b/arch/ppc/boot/simple/misc.c
> @@ -7,10 +7,10 @@
> * your serial console. If a machine meets these requirements, it can quite
> * likely use this code during boot.
> *
> - * Author: Matt Porter <mporter@mvista.com>
> + * Author: Tom Rini <trini@mvista.com>
> * Derived from arch/ppc/boot/prep/misc.c
> *
> - * 2001 (c) MontaVista, Software, Inc. This file is licensed under
> + * 2001-2005 (c) MontaVista, Software, Inc. This file is licensed under
> * the terms of the GNU General Public License version 2. This program
> * is licensed "as is" without any warranty of any kind, whether express
> * or implied.
> @@ -56,6 +56,11 @@
> #define INTERACTIVE_CONSOLE 1
> #endif
>
> +#define ONE_MB (1 << 20)
> +#define MAX_BI_RECS (8 * 1024)
> +#define MAX_AVAIL_MEM (4 * ONE_MB)
> +#define RAM_RESERVE (4 * ONE_MB)
> +
> char *avail_ram;
> char *end_avail;
> char *zimage_start;
> @@ -97,7 +102,8 @@ decompress_kernel(unsigned long load_add
> #endif
> char *cp;
> struct bi_record *rec;
> - unsigned long initrd_loc = 0, TotalMemory = 0;
> + unsigned long initrd_loc, TotalMemory;
> + unsigned long max_kernel, top_free;
>
> #if defined(CONFIG_SERIAL_8250_CONSOLE) || defined(CONFIG_SERIAL_MPSC_CONSOLE)
> com_port = serial_init(0, NULL);
> @@ -119,9 +125,6 @@ decompress_kernel(unsigned long load_add
> */
> TotalMemory = get_mem_size();
>
> - /* assume the chunk below 8M is free */
> - end_avail = (char *)0x00800000;
> -
> /*
> * Reveal where we were loaded at and where we
> * were relocated to.
> @@ -153,7 +156,6 @@ decompress_kernel(unsigned long load_add
> * The zImage and initrd will be between start and _end, so they've
> * already been moved once. We're good to go now. -- Tom
> */
> - avail_ram = (char *)PAGE_ALIGN((unsigned long)_end);
> puts("zimage at: "); puthex((unsigned long)zimage_start);
> puts(" "); puthex((unsigned long)(zimage_size+zimage_start));
> puts("\n");
> @@ -164,11 +166,51 @@ decompress_kernel(unsigned long load_add
> puts(" "); puthex((unsigned long)(&__ramdisk_end));puts("\n");
> }
>
> - avail_ram = (char *)0x00400000;
> - end_avail = (char *)0x00800000;
> + /*
> + * If there is sufficent memory move the available RAM area after
> + * the zImage (but stay away from the top of RAM). Otherwise fudge
> + * it to fit in below the zImage as it did in the past.
> + */
> +
> + top_free = _ALIGN((unsigned long)(_end) + ONE_MB - 1, ONE_MB);
> +
> + if ((TotalMemory != 0) &&
> + ((top_free + MAX_AVAIL_MEM + RAM_RESERVE) < TotalMemory)) {
> + avail_ram = (char *) top_free;
> +
> + /*
> + * We're linked in the middle of RAM and the kernel starts
> + * at zero. This means that the kernel must fit between
> + * zero and our starting address. Figure out the highest
> + * address below this that will allow a complete
> + * uncompressed kernel and bi_recs to fit - the maximum
> + * kernel size.
> + */
> +
> + max_kernel = (unsigned long) &start;
> +
> + while (1) {
> + avail_ram = (char *) bootinfo_addr(max_kernel);
> +
> + if ((avail_ram + MAX_BI_RECS) < ((char *) &start))
> + break;
> +
> + max_kernel -= MAX_BI_RECS;
> + }
> + }
> + else {
> + max_kernel = ((unsigned long) &start) - MAX_AVAIL_MEM;
> + avail_ram = max_kernel;
> + }
> +
> + end_avail = avail_ram + MAX_AVAIL_MEM;
> +
> puts("avail ram: "); puthex((unsigned long)avail_ram); puts(" ");
> puthex((unsigned long)end_avail); puts("\n");
>
> + /* Document the limitation */
> + puts("max kernel: "); puthex(max_kernel); puts("\n");
> +
> if (keyb_present)
> CRT_tstc(); /* Forces keyboard to be initialized */
> #ifdef CONFIG_GEMINI
> @@ -222,32 +264,12 @@ decompress_kernel(unsigned long load_add
> puts("\n");
>
> puts("Uncompressing Linux...");
> - gunzip(NULL, 0x400000, zimage_start, &zimage_size);
> + gunzip(NULL, max_kernel, zimage_start, &zimage_size);
> puts("done.\n");
>
> /* get the bi_rec address */
> rec = bootinfo_addr(zimage_size);
>
> - /* We need to make sure that the initrd and bi_recs do not
> - * overlap. */
> - if ( initrd_size ) {
> - unsigned long rec_loc = (unsigned long) rec;
> - initrd_loc = (unsigned long)(&__ramdisk_begin);
> - /* If the bi_recs are in the middle of the current
> - * initrd, move the initrd to the next MB
> - * boundary. */
> - if ((rec_loc > initrd_loc) &&
> - ((initrd_loc + initrd_size) > rec_loc)) {
> - initrd_loc = _ALIGN((unsigned long)(zimage_size)
> - + (2 << 20) - 1, (2 << 20));
> - memmove((void *)initrd_loc, &__ramdisk_begin,
> - initrd_size);
> - puts("initrd moved: "); puthex(initrd_loc);
> - puts(" "); puthex(initrd_loc + initrd_size);
> - puts("\n");
> - }
> - }
> -
> bootinfo_init(rec);
> if ( TotalMemory )
> bootinfo_append(BI_MEMSIZE, sizeof(int), (void*)&TotalMemory);
> @@ -258,7 +280,7 @@ decompress_kernel(unsigned long load_add
> if (initrd_size) {
> unsigned long initrd[2];
>
> - initrd[0] = initrd_loc;
> + initrd[0] = (unsigned long)(&__ramdisk_begin);
> initrd[1] = initrd_size;
>
> bootinfo_append(BI_INITRD, sizeof(initrd), &initrd);
>
From: Matt Porter <mporter@kernel.crashing.org>
Cleanup PPC40x eval boards (bubinga, walnut and sycamore) to support U-Boot
as bootloader. The OpenBIOS bd_info struct is not used in the kernel
anymore (only U-Boot now).
uImage (U-Boot) tested on walnut, sycamore and bubinga
zImage (OpenBIOS) tested on sycamore, bubinga and ebony
Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Matt Porter <mporter@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---
arch/ppc/boot/simple/Makefile | 21 +++++++
arch/ppc/boot/simple/misc.c | 16 ++++-
arch/ppc/boot/simple/openbios.c | 106 +++++++++++++++++++++++++++++++++++---
arch/ppc/platforms/4xx/Kconfig | 2
arch/ppc/platforms/4xx/bubinga.c | 2
arch/ppc/platforms/4xx/bubinga.h | 64 +++++++++-------------
arch/ppc/platforms/4xx/ebony.h | 4 -
arch/ppc/platforms/4xx/sycamore.c | 7 --
arch/ppc/platforms/4xx/sycamore.h | 67 +++++++++---------------
arch/ppc/platforms/4xx/walnut.c | 2
arch/ppc/platforms/4xx/walnut.h | 67 ++++++++----------------
include/asm-ppc/ibm_ocp.h | 19 +++++-
include/asm-ppc/ppcboot.h | 6 +-
13 files changed, 237 insertions(+), 146 deletions(-)
diff -puN arch/ppc/boot/simple/Makefile~ppc32-cleanup-amcc-ppc40x-eval-boards-to-support-u-boot arch/ppc/boot/simple/Makefile
--- devel/arch/ppc/boot/simple/Makefile~ppc32-cleanup-amcc-ppc40x-eval-boards-to-support-u-boot 2005-10-31 20:15:04.000000000 -0800
+++ devel-akpm/arch/ppc/boot/simple/Makefile 2005-10-31 20:15:04.000000000 -0800
@@ -67,6 +67,12 @@ zimageinitrd-$(CONFIG_BAMBOO) := zImage
entrypoint-$(CONFIG_BAMBOO) := 0x01000000
extra.o-$(CONFIG_BAMBOO) := pibs.o
+ zimage-$(CONFIG_BUBINGA) := zImage-TREE
+zimageinitrd-$(CONFIG_BUBINGA) := zImage.initrd-TREE
+ end-$(CONFIG_BUBINGA) := bubinga
+ entrypoint-$(CONFIG_BUBINGA) := 0x01000000
+ extra.o-$(CONFIG_BUBINGA) := openbios.o
+
zimage-$(CONFIG_EBONY) := zImage-TREE
zimageinitrd-$(CONFIG_EBONY) := zImage.initrd-TREE
end-$(CONFIG_EBONY) := ebony
@@ -91,6 +97,18 @@ zimageinitrd-$(CONFIG_OCOTEA) := zImage
entrypoint-$(CONFIG_OCOTEA) := 0x01000000
extra.o-$(CONFIG_OCOTEA) := pibs.o
+ zimage-$(CONFIG_SYCAMORE) := zImage-TREE
+zimageinitrd-$(CONFIG_SYCAMORE) := zImage.initrd-TREE
+ end-$(CONFIG_SYCAMORE) := sycamore
+ entrypoint-$(CONFIG_SYCAMORE) := 0x01000000
+ extra.o-$(CONFIG_SYCAMORE) := openbios.o
+
+ zimage-$(CONFIG_WALNUT) := zImage-TREE
+zimageinitrd-$(CONFIG_WALNUT) := zImage.initrd-TREE
+ end-$(CONFIG_WALNUT) := walnut
+ entrypoint-$(CONFIG_WALNUT) := 0x01000000
+ extra.o-$(CONFIG_WALNUT) := openbios.o
+
extra.o-$(CONFIG_EV64260) := misc-ev64260.o
end-$(CONFIG_EV64260) := ev64260
cacheflag-$(CONFIG_EV64260) := -include $(clear_L2_L3)
@@ -168,7 +186,8 @@ OBJCOPY_ARGS := -O elf32-powerpc
# head.o and relocate.o must be at the start.
boot-y := head.o relocate.o $(extra.o-y) $(misc-y)
-boot-$(CONFIG_40x) += embed_config.o
+boot-$(CONFIG_REDWOOD_5) += embed_config.o
+boot-$(CONFIG_REDWOOD_6) += embed_config.o
boot-$(CONFIG_8xx) += embed_config.o
boot-$(CONFIG_8260) += embed_config.o
boot-$(CONFIG_BSEIP) += iic.o
diff -puN arch/ppc/boot/simple/misc.c~ppc32-cleanup-amcc-ppc40x-eval-boards-to-support-u-boot arch/ppc/boot/simple/misc.c
--- devel/arch/ppc/boot/simple/misc.c~ppc32-cleanup-amcc-ppc40x-eval-boards-to-support-u-boot 2005-10-31 20:15:04.000000000 -0800
+++ devel-akpm/arch/ppc/boot/simple/misc.c 2005-10-31 20:15:04.000000000 -0800
@@ -23,7 +23,7 @@
#include <asm/page.h>
#include <asm/mmu.h>
#include <asm/bootinfo.h>
-#ifdef CONFIG_44x
+#ifdef CONFIG_4xx
#include <asm/ibm4xx.h>
#endif
#include <asm/reg.h>
@@ -88,6 +88,14 @@ get_mem_size(void)
return 0;
}
+#if defined(CONFIG_40x)
+#define PPC4xx_EMAC0_MR0 EMAC0_BASE
+#endif
+
+#if defined(CONFIG_44x) && defined(PPC44x_EMAC0_MR0)
+#define PPC4xx_EMAC0_MR0 PPC44x_EMAC0_MR0
+#endif
+
struct bi_record *
decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum)
{
@@ -103,13 +111,13 @@ decompress_kernel(unsigned long load_add
com_port = serial_init(0, NULL);
#endif
-#if defined(CONFIG_44x) && defined(PPC44x_EMAC0_MR0)
+#if defined(PPC4xx_EMAC0_MR0)
/* Reset MAL */
mtdcr(DCRN_MALCR(DCRN_MAL_BASE), MALCR_MMSR);
/* Wait for reset */
while (mfdcr(DCRN_MALCR(DCRN_MAL_BASE)) & MALCR_MMSR) {};
/* Reset EMAC */
- *(volatile unsigned long *)PPC44x_EMAC0_MR0 = 0x20000000;
+ *(volatile unsigned long *)PPC4xx_EMAC0_MR0 = 0x20000000;
__asm__ __volatile__("eieio");
#endif
@@ -164,7 +172,9 @@ decompress_kernel(unsigned long load_add
puts(" "); puthex((unsigned long)(&__ramdisk_end));puts("\n");
}
+#ifndef CONFIG_40x /* don't overwrite the 40x image located at 0x00400000! */
avail_ram = (char *)0x00400000;
+#endif
end_avail = (char *)0x00800000;
puts("avail ram: "); puthex((unsigned long)avail_ram); puts(" ");
puthex((unsigned long)end_avail); puts("\n");
diff -puN arch/ppc/boot/simple/openbios.c~ppc32-cleanup-amcc-ppc40x-eval-boards-to-support-u-boot arch/ppc/boot/simple/openbios.c
--- devel/arch/ppc/boot/simple/openbios.c~ppc32-cleanup-amcc-ppc40x-eval-boards-to-support-u-boot 2005-10-31 20:15:04.000000000 -0800
+++ devel-akpm/arch/ppc/boot/simple/openbios.c 2005-10-31 20:15:04.000000000 -0800
@@ -1,19 +1,43 @@
/*
* arch/ppc/boot/simple/openbios.c
*
- * 2005 (c) SYSGO AG - g.jaeger@sysgo.com
+ * Copyright (c) 2005 DENX Software Engineering
+ * Stefan Roese <sr@denx.de>
+ *
+ * Based on original work by
+ * 2005 (c) SYSGO AG - g.jaeger@sysgo.com
+ *
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without
* any warranty of any kind, whether express or implied.
*
- * Derived from arch/ppc/boot/simple/pibs.c (from MontaVista)
*/
#include <linux/types.h>
#include <linux/config.h>
#include <linux/string.h>
#include <asm/ppcboot.h>
-#include <platforms/4xx/ebony.h>
+#include <asm/ibm4xx.h>
+#include <asm/reg.h>
+#ifdef CONFIG_40x
+#include <asm/io.h>
+#endif
+
+#if defined(CONFIG_BUBINGA)
+#define BOARD_INFO_VECTOR 0xFFF80B50 /* openbios 1.19 moved this vector down - armin */
+#else
+#define BOARD_INFO_VECTOR 0xFFFE0B50
+#endif
+
+#ifdef CONFIG_40x
+/* Supply a default Ethernet address for those eval boards that don't
+ * ship with one. This is an address from the MBX board I have, so
+ * it is unlikely you will find it on your network.
+ */
+static ushort def_enet_addr[] = { 0x0800, 0x3e26, 0x1559 };
+
+extern unsigned long timebase_period_ns;
+#endif /* CONFIG_40x */
extern unsigned long decompress_kernel(unsigned long load_addr, int num_words,
unsigned long cksum);
@@ -23,15 +47,85 @@ extern unsigned long decompress_kernel(u
bd_t hold_resid_buf __attribute__ ((__section__ (".data.boot")));
bd_t *hold_residual = &hold_resid_buf;
+typedef struct openbios_board_info {
+ unsigned char bi_s_version[4]; /* Version of this structure */
+ unsigned char bi_r_version[30]; /* Version of the IBM ROM */
+ unsigned int bi_memsize; /* DRAM installed, in bytes */
+#ifdef CONFIG_405EP
+ unsigned char bi_enetaddr[2][6]; /* Local Ethernet MAC address */
+#else /* CONFIG_405EP */
+ unsigned char bi_enetaddr[6]; /* Local Ethernet MAC address */
+#endif /* CONFIG_405EP */
+ unsigned char bi_pci_enetaddr[6]; /* PCI Ethernet MAC address */
+ unsigned int bi_intfreq; /* Processor speed, in Hz */
+ unsigned int bi_busfreq; /* PLB Bus speed, in Hz */
+ unsigned int bi_pci_busfreq; /* PCI Bus speed, in Hz */
+#ifdef CONFIG_405EP
+ unsigned int bi_opb_busfreq; /* OPB Bus speed, in Hz */
+ unsigned int bi_pllouta_freq; /* PLL OUTA speed, in Hz */
+#endif /* CONFIG_405EP */
+} openbios_bd_t;
+
void *
load_kernel(unsigned long load_addr, int num_words, unsigned long cksum,
void *ign1, void *ign2)
{
- decompress_kernel(load_addr, num_words, cksum);
+#ifdef CONFIG_40x
+ openbios_bd_t *openbios_bd = NULL;
+ openbios_bd_t *(*get_board_info)(void) =
+ (openbios_bd_t *(*)(void))(*(unsigned long *)BOARD_INFO_VECTOR);
+
+ /*
+ * On 40x platforms we not only need the MAC-addresses, but also the
+ * clocks and memsize. Now try to get all values using the OpenBIOS
+ * "get_board_info()" callback.
+ */
+ if ((openbios_bd = get_board_info()) != NULL) {
+ /*
+ * Copy bd_info from OpenBIOS struct into U-Boot struct
+ * used by kernel
+ */
+ hold_residual->bi_memsize = openbios_bd->bi_memsize;
+ hold_residual->bi_intfreq = openbios_bd->bi_intfreq;
+ hold_residual->bi_busfreq = openbios_bd->bi_busfreq;
+ hold_residual->bi_pci_busfreq = openbios_bd->bi_pci_busfreq;
+ memcpy(hold_residual->bi_pci_enetaddr, openbios_bd->bi_pci_enetaddr, 6);
+#ifdef CONFIG_405EP
+ memcpy(hold_residual->bi_enetaddr, openbios_bd->bi_enetaddr[0], 6);
+ memcpy(hold_residual->bi_enet1addr, openbios_bd->bi_enetaddr[1], 6);
+ hold_residual->bi_opbfreq = openbios_bd->bi_opb_busfreq;
+ hold_residual->bi_procfreq = openbios_bd->bi_pllouta_freq;
+#else /* CONFIG_405EP */
+ memcpy(hold_residual->bi_enetaddr, openbios_bd->bi_enetaddr, 6);
+#endif /* CONFIG_405EP */
+ } else {
+ /* Hmmm...better try to stuff some defaults.
+ */
+ hold_residual->bi_memsize = 16 * 1024 * 1024;
+ hold_residual->bi_intfreq = 200000000;
+ hold_residual->bi_busfreq = 100000000;
+ hold_residual->bi_pci_busfreq = 66666666;
+
+ /*
+ * Only supply one mac-address in this fallback
+ */
+ memcpy(hold_residual->bi_enetaddr, (void *)def_enet_addr, 6);
+#ifdef CONFIG_405EP
+ hold_residual->bi_opbfreq = 50000000;
+ hold_residual->bi_procfreq = 200000000;
+#endif /* CONFIG_405EP */
+ }
+
+ timebase_period_ns = 1000000000 / hold_residual->bi_intfreq;
+#endif /* CONFIG_40x */
+#ifdef CONFIG_440GP
/* simply copy the MAC addresses */
- memcpy(hold_residual->bi_enetaddr, (char *)EBONY_OPENBIOS_MAC_BASE, 6);
- memcpy(hold_residual->bi_enet1addr, (char *)(EBONY_OPENBIOS_MAC_BASE+EBONY_OPENBIOS_MAC_OFFSET), 6);
+ memcpy(hold_residual->bi_enetaddr, (char *)OPENBIOS_MAC_BASE, 6);
+ memcpy(hold_residual->bi_enet1addr, (char *)(OPENBIOS_MAC_BASE+OPENBIOS_MAC_OFFSET), 6);
+#endif /* CONFIG_440GP */
+
+ decompress_kernel(load_addr, num_words, cksum);
return (void *)hold_residual;
}
diff -puN arch/ppc/platforms/4xx/bubinga.c~ppc32-cleanup-amcc-ppc40x-eval-boards-to-support-u-boot arch/ppc/platforms/4xx/bubinga.c
--- devel/arch/ppc/platforms/4xx/bubinga.c~ppc32-cleanup-amcc-ppc40x-eval-boards-to-support-u-boot 2005-10-31 20:15:04.000000000 -0800
+++ devel-akpm/arch/ppc/platforms/4xx/bubinga.c 2005-10-31 20:15:04.000000000 -0800
@@ -89,7 +89,7 @@ bubinga_early_serial_map(void)
* by 16.
*/
uart_div = (mfdcr(DCRN_CPC0_UCR_BASE) & DCRN_CPC0_UCR_U0DIV);
- uart_clock = __res.bi_pllouta_freq / uart_div;
+ uart_clock = __res.bi_procfreq / uart_div;
/* Setup serial port access */
memset(&port, 0, sizeof(port));
diff -puN arch/ppc/platforms/4xx/bubinga.h~ppc32-cleanup-amcc-ppc40x-eval-boards-to-support-u-boot arch/ppc/platforms/4xx/bubinga.h
--- devel/arch/ppc/platforms/4xx/bubinga.h~ppc32-cleanup-amcc-ppc40x-eval-boards-to-support-u-boot 2005-10-31 20:15:04.000000000 -0800
+++ devel-akpm/arch/ppc/platforms/4xx/bubinga.h 2005-10-31 20:15:04.000000000 -0800
@@ -1,52 +1,34 @@
/*
- * Support for IBM PPC 405EP evaluation board (Bubinga).
+ * arch/ppc/platforms/4xx/bubinga.h
*
- * Author: SAW (IBM), derived from walnut.h.
- * Maintained by MontaVista Software <source@mvista.com>
+ * Bubinga board definitions
+ *
+ * Copyright (c) 2005 DENX Software Engineering
+ * Stefan Roese <sr@denx.de>
+ *
+ * Based on original work by
+ * SAW (IBM)
+ * 2003 (c) MontaVista Softare Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
*
- * 2003 (c) MontaVista Softare Inc. This file is licensed under the
- * terms of the GNU General Public License version 2. This program is
- * licensed "as is" without any warranty of any kind, whether express
- * or implied.
*/
#ifdef __KERNEL__
#ifndef __BUBINGA_H__
#define __BUBINGA_H__
-/* 405EP */
+#include <linux/config.h>
#include <platforms/4xx/ibm405ep.h>
-
-#ifndef __ASSEMBLY__
-/*
- * Data structure defining board information maintained by the boot
- * ROM on IBM's evaluation board. An effort has been made to
- * keep the field names consistent with the 8xx 'bd_t' board info
- * structures.
- */
-
-typedef struct board_info {
- unsigned char bi_s_version[4]; /* Version of this structure */
- unsigned char bi_r_version[30]; /* Version of the IBM ROM */
- unsigned int bi_memsize; /* DRAM installed, in bytes */
- unsigned char bi_enetaddr[2][6]; /* Local Ethernet MAC address */ unsigned char bi_pci_enetaddr[6]; /* PCI Ethernet MAC address */
- unsigned int bi_intfreq; /* Processor speed, in Hz */
- unsigned int bi_busfreq; /* PLB Bus speed, in Hz */
- unsigned int bi_pci_busfreq; /* PCI Bus speed, in Hz */
- unsigned int bi_opb_busfreq; /* OPB Bus speed, in Hz */
- unsigned int bi_pllouta_freq; /* PLL OUTA speed, in Hz */
-} bd_t;
-
-/* Some 4xx parts use a different timebase frequency from the internal clock.
-*/
-#define bi_tbfreq bi_intfreq
-
+#include <asm/ppcboot.h>
/* Memory map for the Bubinga board.
* Generic 4xx plus RTC.
*/
-extern void *bubinga_rtc_base;
#define BUBINGA_RTC_PADDR ((uint)0xf0000000)
#define BUBINGA_RTC_VADDR BUBINGA_RTC_PADDR
#define BUBINGA_RTC_SIZE ((uint)8*1024)
@@ -58,12 +40,18 @@ extern void *bubinga_rtc_base;
* for typical configurations at various CPU speeds.
* The base baud is calculated as (FWDA / EXT UART DIV / 16)
*/
-#define BASE_BAUD 0
+#define BASE_BAUD 0
-#define BUBINGA_FPGA_BASE 0xF0300000
+/* Flash */
+#define PPC40x_FPGA_BASE 0xF0300000
+#define PPC40x_FPGA_REG_OFFS 1 /* offset to flash map reg */
+#define PPC40x_FLASH_ONBD_N(x) (x & 0x02)
+#define PPC40x_FLASH_SRAM_SEL(x) (x & 0x01)
+#define PPC40x_FLASH_LOW 0xFFF00000
+#define PPC40x_FLASH_HIGH 0xFFF80000
+#define PPC40x_FLASH_SIZE 0x80000
-#define PPC4xx_MACHINE_NAME "IBM Bubinga"
+#define PPC4xx_MACHINE_NAME "IBM Bubinga"
-#endif /* !__ASSEMBLY__ */
#endif /* __BUBINGA_H__ */
#endif /* __KERNEL__ */
diff -puN arch/ppc/platforms/4xx/ebony.h~ppc32-cleanup-amcc-ppc40x-eval-boards-to-support-u-boot arch/ppc/platforms/4xx/ebony.h
--- devel/arch/ppc/platforms/4xx/ebony.h~ppc32-cleanup-amcc-ppc40x-eval-boards-to-support-u-boot 2005-10-31 20:15:04.000000000 -0800
+++ devel-akpm/arch/ppc/platforms/4xx/ebony.h 2005-10-31 20:15:04.000000000 -0800
@@ -24,8 +24,8 @@
#define PPC44x_EMAC0_MR0 0xE0000800
/* Where to find the MAC info */
-#define EBONY_OPENBIOS_MAC_BASE 0xfffffe0c
-#define EBONY_OPENBIOS_MAC_OFFSET 0x0c
+#define OPENBIOS_MAC_BASE 0xfffffe0c
+#define OPENBIOS_MAC_OFFSET 0x0c
/* Default clock rates for Rev. B and Rev. C silicon */
#define EBONY_440GP_RB_SYSCLK 33000000
diff -puN arch/ppc/platforms/4xx/Kconfig~ppc32-cleanup-amcc-ppc40x-eval-boards-to-support-u-boot arch/ppc/platforms/4xx/Kconfig
--- devel/arch/ppc/platforms/4xx/Kconfig~ppc32-cleanup-amcc-ppc40x-eval-boards-to-support-u-boot 2005-10-31 20:15:04.000000000 -0800
+++ devel-akpm/arch/ppc/platforms/4xx/Kconfig 2005-10-31 20:15:04.000000000 -0800
@@ -225,7 +225,7 @@ config EMBEDDEDBOOT
config IBM_OPENBIOS
bool
- depends on ASH || BUBINGA || REDWOOD_5 || REDWOOD_6 || SYCAMORE || WALNUT
+ depends on ASH || REDWOOD_5 || REDWOOD_6
default y
config PPC4xx_DMA
diff -puN arch/ppc/platforms/4xx/sycamore.c~ppc32-cleanup-amcc-ppc40x-eval-boards-to-support-u-boot arch/ppc/platforms/4xx/sycamore.c
--- devel/arch/ppc/platforms/4xx/sycamore.c~ppc32-cleanup-amcc-ppc40x-eval-boards-to-support-u-boot 2005-10-31 20:15:04.000000000 -0800
+++ devel-akpm/arch/ppc/platforms/4xx/sycamore.c 2005-10-31 20:15:04.000000000 -0800
@@ -88,9 +88,6 @@ ppc405_map_irq(struct pci_dev *dev, unsi
void __init
sycamore_setup_arch(void)
{
-#define SYCAMORE_PS2_BASE 0xF0100000
-#define SYCAMORE_FPGA_BASE 0xF0300000
-
void *fpga_brdc;
unsigned char fpga_brdc_data;
void *fpga_enable;
@@ -100,7 +97,7 @@ sycamore_setup_arch(void)
ppc4xx_setup_arch();
- ibm_ocp_set_emac(0, 1);
+ ibm_ocp_set_emac(0, 0);
kb_data = ioremap(SYCAMORE_PS2_BASE, 8);
if (!kb_data) {
@@ -111,7 +108,7 @@ sycamore_setup_arch(void)
kb_cs = kb_data + 1;
- fpga_status = ioremap(SYCAMORE_FPGA_BASE, 8);
+ fpga_status = ioremap(PPC40x_FPGA_BASE, 8);
if (!fpga_status) {
printk(KERN_CRIT
"sycamore_setup_arch() fpga_status ioremap failed\n");
diff -puN arch/ppc/platforms/4xx/sycamore.h~ppc32-cleanup-amcc-ppc40x-eval-boards-to-support-u-boot arch/ppc/platforms/4xx/sycamore.h
--- devel/arch/ppc/platforms/4xx/sycamore.h~ppc32-cleanup-amcc-ppc40x-eval-boards-to-support-u-boot 2005-10-31 20:15:04.000000000 -0800
+++ devel-akpm/arch/ppc/platforms/4xx/sycamore.h 2005-10-31 20:15:04.000000000 -0800
@@ -1,67 +1,52 @@
/*
* arch/ppc/platforms/4xx/sycamore.h
*
- * Macros, definitions, and data structures specific to the IBM PowerPC
- * 405GPr "Sycamore" evaluation board.
+ * Sycamore board definitions
*
- * Author: Armin Kuster <akuster@mvista.com>
+ * Copyright (c) 2005 DENX Software Engineering
+ * Stefan Roese <sr@denx.de>
+ *
+ * Based on original work by
+ * Armin Kuster <akuster@mvista.com>
+ * 2000 (c) MontaVista, Software, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
*
- * 2000 (c) MontaVista, Software, Inc. This file is licensed under
- * the terms of the GNU General Public License version 2. This program
- * is licensed "as is" without any warranty of any kind, whether express
- * or implied.
*/
#ifdef __KERNEL__
#ifndef __ASM_SYCAMORE_H__
#define __ASM_SYCAMORE_H__
+#include <linux/config.h>
#include <platforms/4xx/ibm405gpr.h>
+#include <asm/ppcboot.h>
-#ifndef __ASSEMBLY__
-/*
- * Data structure defining board information maintained by the boot
- * ROM on IBM's "Sycamore" evaluation board. An effort has been made to
- * keep the field names consistent with the 8xx 'bd_t' board info
- * structures.
- */
-
-typedef struct board_info {
- unsigned char bi_s_version[4]; /* Version of this structure */
- unsigned char bi_r_version[30]; /* Version of the IBM ROM */
- unsigned int bi_memsize; /* DRAM installed, in bytes */
- unsigned char bi_enetaddr[6]; /* Local Ethernet MAC address */
- unsigned char bi_pci_enetaddr[6]; /* PCI Ethernet MAC address */
- unsigned int bi_intfreq; /* Processor speed, in Hz */
- unsigned int bi_busfreq; /* PLB Bus speed, in Hz */
- unsigned int bi_pci_busfreq; /* PCI Bus speed, in Hz */
-} bd_t;
-
-/* Some 4xx parts use a different timebase frequency from the internal clock.
-*/
-#define bi_tbfreq bi_intfreq
-
-
-/* Memory map for the IBM "Sycamore" 405GP evaluation board.
+/* Memory map for the IBM "Sycamore" 405GPr evaluation board.
* Generic 4xx plus RTC.
*/
-extern void *sycamore_rtc_base;
#define SYCAMORE_RTC_PADDR ((uint)0xf0000000)
#define SYCAMORE_RTC_VADDR SYCAMORE_RTC_PADDR
-#define SYCAMORE_RTC_SIZE ((uint)8*1024)
+#define SYCAMORE_RTC_SIZE ((uint)8*1024)
-#ifdef CONFIG_PPC405GP_INTERNAL_CLOCK
-#define BASE_BAUD 201600
-#else
#define BASE_BAUD 691200
-#endif
-#define SYCAMORE_PS2_BASE 0xF0100000
-#define SYCAMORE_FPGA_BASE 0xF0300000
+#define SYCAMORE_PS2_BASE 0xF0100000
+
+/* Flash */
+#define PPC40x_FPGA_BASE 0xF0300000
+#define PPC40x_FPGA_REG_OFFS 5 /* offset to flash map reg */
+#define PPC40x_FLASH_ONBD_N(x) (x & 0x02)
+#define PPC40x_FLASH_SRAM_SEL(x) (x & 0x01)
+#define PPC40x_FLASH_LOW 0xFFF00000
+#define PPC40x_FLASH_HIGH 0xFFF80000
+#define PPC40x_FLASH_SIZE 0x80000
#define PPC4xx_MACHINE_NAME "IBM Sycamore"
-#endif /* !__ASSEMBLY__ */
#endif /* __ASM_SYCAMORE_H__ */
#endif /* __KERNEL__ */
diff -puN arch/ppc/platforms/4xx/walnut.c~ppc32-cleanup-amcc-ppc40x-eval-boards-to-support-u-boot arch/ppc/platforms/4xx/walnut.c
--- devel/arch/ppc/platforms/4xx/walnut.c~ppc32-cleanup-amcc-ppc40x-eval-boards-to-support-u-boot 2005-10-31 20:15:04.000000000 -0800
+++ devel-akpm/arch/ppc/platforms/4xx/walnut.c 2005-10-31 20:15:04.000000000 -0800
@@ -90,7 +90,7 @@ walnut_setup_arch(void)
kb_cs = kb_data + 1;
- fpga_status = ioremap(WALNUT_FPGA_BASE, 8);
+ fpga_status = ioremap(PPC40x_FPGA_BASE, 8);
if (!fpga_status) {
printk(KERN_CRIT
"walnut_setup_arch() fpga_status ioremap failed\n");
diff -puN arch/ppc/platforms/4xx/walnut.h~ppc32-cleanup-amcc-ppc40x-eval-boards-to-support-u-boot arch/ppc/platforms/4xx/walnut.h
--- devel/arch/ppc/platforms/4xx/walnut.h~ppc32-cleanup-amcc-ppc40x-eval-boards-to-support-u-boot 2005-10-31 20:15:04.000000000 -0800
+++ devel-akpm/arch/ppc/platforms/4xx/walnut.h 2005-10-31 20:15:04.000000000 -0800
@@ -1,72 +1,55 @@
/*
* arch/ppc/platforms/4xx/walnut.h
*
- * Macros, definitions, and data structures specific to the IBM PowerPC
- * 405GP "Walnut" evaluation board.
+ * Walnut board definitions
*
- * Authors: Grant Erickson <grant@lcse.umn.edu>, Frank Rowand
- * <frank_rowand@mvista.com>, Debbie Chu <debbie_chu@mvista.com> or
- * source@mvista.com
+ * Copyright (c) 2005 DENX Software Engineering
+ * Stefan Roese <sr@denx.de>
*
- * Copyright (c) 1999 Grant Erickson <grant@lcse.umn.edu>
+ * Based on original work by
+ * Copyright (c) 1999 Grant Erickson <grant@lcse.umn.edu>
+ * Frank Rowand <frank_rowand@mvista.com>
+ * Debbie Chu <debbie_chu@mvista.com>
+ * 2000 (c) MontaVista, Software, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
*
- * 2000 (c) MontaVista, Software, Inc. This file is licensed under
- * the terms of the GNU General Public License version 2. This program
- * is licensed "as is" without any warranty of any kind, whether express
- * or implied.
*/
#ifdef __KERNEL__
#ifndef __ASM_WALNUT_H__
#define __ASM_WALNUT_H__
-/* We have a 405GP core */
+#include <linux/config.h>
#include <platforms/4xx/ibm405gp.h>
-
-#ifndef __ASSEMBLY__
-/*
- * Data structure defining board information maintained by the boot
- * ROM on IBM's "Walnut" evaluation board. An effort has been made to
- * keep the field names consistent with the 8xx 'bd_t' board info
- * structures.
- */
-
-typedef struct board_info {
- unsigned char bi_s_version[4]; /* Version of this structure */
- unsigned char bi_r_version[30]; /* Version of the IBM ROM */
- unsigned int bi_memsize; /* DRAM installed, in bytes */
- unsigned char bi_enetaddr[6]; /* Local Ethernet MAC address */
- unsigned char bi_pci_enetaddr[6]; /* PCI Ethernet MAC address */
- unsigned int bi_intfreq; /* Processor speed, in Hz */
- unsigned int bi_busfreq; /* PLB Bus speed, in Hz */
- unsigned int bi_pci_busfreq; /* PCI Bus speed, in Hz */
-} bd_t;
-
-/* Some 4xx parts use a different timebase frequency from the internal clock.
-*/
-#define bi_tbfreq bi_intfreq
-
+#include <asm/ppcboot.h>
/* Memory map for the IBM "Walnut" 405GP evaluation board.
* Generic 4xx plus RTC.
*/
-extern void *walnut_rtc_base;
#define WALNUT_RTC_PADDR ((uint)0xf0000000)
#define WALNUT_RTC_VADDR WALNUT_RTC_PADDR
#define WALNUT_RTC_SIZE ((uint)8*1024)
-#ifdef CONFIG_PPC405GP_INTERNAL_CLOCK
-#define BASE_BAUD 201600
-#else
#define BASE_BAUD 691200
-#endif
#define WALNUT_PS2_BASE 0xF0100000
-#define WALNUT_FPGA_BASE 0xF0300000
+
+/* Flash */
+#define PPC40x_FPGA_BASE 0xF0300000
+#define PPC40x_FPGA_REG_OFFS 5 /* offset to flash map reg */
+#define PPC40x_FLASH_ONBD_N(x) (x & 0x02)
+#define PPC40x_FLASH_SRAM_SEL(x) (x & 0x01)
+#define PPC40x_FLASH_LOW 0xFFF00000
+#define PPC40x_FLASH_HIGH 0xFFF80000
+#define PPC40x_FLASH_SIZE 0x80000
+#define WALNUT_FPGA_BASE PPC40x_FPGA_BASE
#define PPC4xx_MACHINE_NAME "IBM Walnut"
-#endif /* !__ASSEMBLY__ */
#endif /* __ASM_WALNUT_H__ */
#endif /* __KERNEL__ */
diff -puN include/asm-ppc/ibm_ocp.h~ppc32-cleanup-amcc-ppc40x-eval-boards-to-support-u-boot include/asm-ppc/ibm_ocp.h
--- devel/include/asm-ppc/ibm_ocp.h~ppc32-cleanup-amcc-ppc40x-eval-boards-to-support-u-boot 2005-10-31 20:15:04.000000000 -0800
+++ devel-akpm/include/asm-ppc/ibm_ocp.h 2005-10-31 20:15:04.000000000 -0800
@@ -131,9 +131,22 @@ static inline void ibm_ocp_set_emac(int
/* Copy MAC addresses to EMAC additions */
for (i=start; i<=end; i++) {
def = ocp_get_one_device(OCP_VENDOR_IBM, OCP_FUNC_EMAC, i);
- memcpy(((struct ocp_func_emac_data *)def->additions)->mac_addr,
- &__res.bi_enetaddr[i],
- 6);
+ if (i == 0)
+ memcpy(((struct ocp_func_emac_data *)def->additions)->mac_addr,
+ __res.bi_enetaddr, 6);
+#if defined(CONFIG_405EP) || defined(CONFIG_44x)
+ else if (i == 1)
+ memcpy(((struct ocp_func_emac_data *)def->additions)->mac_addr,
+ __res.bi_enet1addr, 6);
+#endif
+#if defined(CONFIG_440GX)
+ else if (i == 2)
+ memcpy(((struct ocp_func_emac_data *)def->additions)->mac_addr,
+ __res.bi_enet2addr, 6);
+ else if (i == 3)
+ memcpy(((struct ocp_func_emac_data *)def->additions)->mac_addr,
+ __res.bi_enet3addr, 6);
+#endif
}
}
#endif
diff -puN include/asm-ppc/ppcboot.h~ppc32-cleanup-amcc-ppc40x-eval-boards-to-support-u-boot include/asm-ppc/ppcboot.h
--- devel/include/asm-ppc/ppcboot.h~ppc32-cleanup-amcc-ppc40x-eval-boards-to-support-u-boot 2005-10-31 20:15:04.000000000 -0800
+++ devel-akpm/include/asm-ppc/ppcboot.h 2005-10-31 20:15:04.000000000 -0800
@@ -73,8 +73,8 @@ typedef struct bd_info {
#if defined(CONFIG_HYMOD)
hymod_conf_t bi_hymod_conf; /* hymod configuration information */
#endif
-#if defined(CONFIG_EVB64260) || defined(CONFIG_44x) || defined(CONFIG_85xx) ||\
- defined(CONFIG_83xx)
+#if defined(CONFIG_EVB64260) || defined(CONFIG_405EP) || defined(CONFIG_44x) || \
+ defined(CONFIG_85xx) || defined(CONFIG_83xx)
/* second onboard ethernet port */
unsigned char bi_enet1addr[6];
#endif
@@ -96,5 +96,7 @@ typedef struct bd_info {
#endif
} bd_t;
+#define bi_tbfreq bi_intfreq
+
#endif /* __ASSEMBLY__ */
#endif /* __ASM_PPCBOOT_H__ */
_
^ permalink raw reply
* Re: ppc32/64 merge
From: Paul Mackerras @ 2005-11-04 23:50 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Andrew Morton, linuxppc-dev
In-Reply-To: <Pine.LNX.4.64.0511041115000.28804@g5.osdl.org>
Linus,
> arch/ppc64/include/asm/elf.h:190:8: warning: memset with byte count of -160
>
> when checking ppc64 with sparse.
>
> It looks like it's even correct. I think elf_gregset_t gets set to
> elf_gregset_t32, which is why "struct pt_regs" is so much bigger than
> elf_gregset_t.
>
> Maybe it's a sparse bug. And maybe it isn't.
No it isn't, it's our bug. Stephen Rothwell and Michael Ellerman
found it a day or two ago and there is a fix in the powerpc-merge tree
already.
If you do a pull from the powerpc-merge tree at
git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-merge.git
(once it's mirrored, or the equivalent from master.kernel.org) you'll
get the fix along with some more merging and some ppc patches.
Diffstat and shortlog follow.
Thanks,
Paul.
arch/powerpc/Kconfig | 29
arch/powerpc/Makefile | 5
arch/powerpc/configs/cell_defconfig | 1024 +++++++++++++++++
arch/powerpc/configs/g5_defconfig | 1392 +++++++++++++++++++++++
arch/powerpc/configs/iseries_defconfig | 998 ++++++++++++++++
arch/powerpc/configs/maple_defconfig | 1062 ++++++++++++++++++
arch/powerpc/configs/pseries_defconfig | 1371 +++++++++++++++++++++++
arch/powerpc/kernel/Makefile | 9
arch/powerpc/kernel/asm-offsets.c | 2
arch/powerpc/kernel/head_64.S | 20
arch/powerpc/kernel/lparmap.c | 2
arch/powerpc/kernel/ppc32.h | 16
arch/powerpc/kernel/ppc_ksyms.c | 9
arch/powerpc/kernel/process.c | 22
arch/powerpc/kernel/prom.c | 2
arch/powerpc/kernel/prom_init.c | 2
arch/powerpc/kernel/rtas-proc.c | 0
arch/powerpc/kernel/rtas.c | 19
arch/powerpc/kernel/rtas_flash.c | 113 ++
arch/powerpc/kernel/setup-common.c | 123 ++
arch/powerpc/kernel/setup_32.c | 2
arch/powerpc/kernel/setup_64.c | 168 +--
arch/powerpc/kernel/signal_32.c | 2
arch/powerpc/kernel/signal_64.c | 0
arch/powerpc/kernel/smp-tbsync.c | 171 +++
arch/powerpc/kernel/smp.c | 61 -
arch/powerpc/kernel/time.c | 4
arch/powerpc/kernel/traps.c | 12
arch/powerpc/kernel/vmlinux.lds.S | 29
arch/powerpc/lib/Makefile | 9
arch/powerpc/lib/bitops.c | 97 +-
arch/powerpc/lib/locks.c | 2
arch/powerpc/platforms/Makefile | 1
arch/powerpc/platforms/cell/Makefile | 2
arch/powerpc/platforms/cell/interrupt.c | 8
arch/powerpc/platforms/cell/interrupt.h | 8
arch/powerpc/platforms/cell/iommu.c | 44 -
arch/powerpc/platforms/cell/iommu.h | 10
arch/powerpc/platforms/cell/setup.c | 46 -
arch/powerpc/platforms/cell/smp.c | 230 ++++
arch/powerpc/platforms/cell/spider-pic.c | 2
arch/powerpc/platforms/chrp/nvram.c | 13
arch/powerpc/platforms/chrp/pegasos_eth.c | 1
arch/powerpc/platforms/chrp/smp.c | 39 -
arch/powerpc/platforms/iseries/call_hpt.h | 4
arch/powerpc/platforms/iseries/call_pci.h | 4
arch/powerpc/platforms/iseries/call_sm.h | 4
arch/powerpc/platforms/iseries/hvlog.c | 6
arch/powerpc/platforms/iseries/hvlpconfig.c | 2
arch/powerpc/platforms/iseries/iommu.c | 2
arch/powerpc/platforms/iseries/irq.c | 6
arch/powerpc/platforms/iseries/ksyms.c | 2
arch/powerpc/platforms/iseries/lpardata.c | 12
arch/powerpc/platforms/iseries/lpevents.c | 8
arch/powerpc/platforms/iseries/mf.c | 8
arch/powerpc/platforms/iseries/naca.h | 8
arch/powerpc/platforms/iseries/pci.c | 4
arch/powerpc/platforms/iseries/proc.c | 4
arch/powerpc/platforms/iseries/release_data.h | 2
arch/powerpc/platforms/iseries/setup.c | 58 +
arch/powerpc/platforms/iseries/smp.c | 2
arch/powerpc/platforms/iseries/vio.c | 8
arch/powerpc/platforms/iseries/viopath.c | 12
arch/powerpc/platforms/iseries/vpdinfo.c | 2
arch/powerpc/platforms/powermac/pic.c | 8
arch/powerpc/platforms/powermac/setup.c | 3
arch/powerpc/platforms/pseries/Kconfig | 9
arch/powerpc/platforms/pseries/Makefile | 2
arch/powerpc/platforms/pseries/iommu.c | 5
arch/powerpc/platforms/pseries/lpar.c | 13
arch/powerpc/platforms/pseries/plpar_wrappers.h | 102 +-
arch/powerpc/platforms/pseries/rtas-fw.c | 138 --
arch/powerpc/platforms/pseries/rtas-fw.h | 3
arch/powerpc/platforms/pseries/rtasd.c | 0
arch/powerpc/platforms/pseries/setup.c | 21
arch/powerpc/platforms/pseries/smp.c | 3
arch/powerpc/sysdev/Makefile | 1
arch/powerpc/sysdev/dart.h | 6
arch/powerpc/sysdev/mmio_nvram.c | 60 -
arch/powerpc/sysdev/u3_iommu.c | 5
arch/ppc/8xx_io/commproc.c | 5
arch/ppc/Makefile | 3
arch/ppc/kernel/Makefile | 1
arch/ppc/kernel/bitops.c | 126 --
arch/ppc/kernel/irq.c | 2
arch/ppc/kernel/machine_kexec.c | 2
arch/ppc/kernel/ppc_ksyms.c | 5
arch/ppc/kernel/traps.c | 8
arch/ppc/syslib/m8xx_setup.c | 1
arch/ppc64/Kconfig | 5
arch/ppc64/Makefile | 1
arch/ppc64/kernel/Makefile | 16
arch/ppc64/kernel/asm-offsets.c | 2
arch/ppc64/kernel/head.S | 20
arch/ppc64/kernel/irq.c | 4
arch/ppc64/kernel/lparcfg.c | 4
arch/ppc64/kernel/machine_kexec.c | 1
arch/ppc64/kernel/pacaData.c | 2
arch/ppc64/kernel/pci_dn.c | 5
arch/ppc64/kernel/proc_ppc64.c | 2
arch/ppc64/kernel/prom_init.c | 4
arch/ppc64/kernel/smp-tbsync.c | 179 ---
arch/ppc64/kernel/udbg_scc.c | 1
arch/ppc64/lib/Makefile | 5
arch/ppc64/lib/string.S | 179 ---
drivers/block/viodasd.c | 8
drivers/cdrom/viocd.c | 6
drivers/char/viocons.c | 10
drivers/char/viotape.c | 10
drivers/macintosh/via-pmu.c | 29
drivers/net/iseries_veth.c | 8
drivers/scsi/ibmvscsi/iseries_vscsi.c | 8
include/asm-powerpc/bitops.h | 437 +++++++
include/asm-powerpc/bug.h | 34 -
include/asm-powerpc/elf.h | 22
include/asm-powerpc/futex.h | 45 -
include/asm-powerpc/ioctls.h | 3
include/asm-powerpc/ipcbuf.h | 34 +
include/asm-powerpc/irq.h | 2
include/asm-powerpc/iseries/hv_call.h | 10
include/asm-powerpc/iseries/hv_call_event.h | 10
include/asm-powerpc/iseries/hv_call_sc.h | 6
include/asm-powerpc/iseries/hv_call_xm.h | 10
include/asm-powerpc/iseries/hv_lp_config.h | 12
include/asm-powerpc/iseries/hv_lp_event.h | 10
include/asm-powerpc/iseries/hv_types.h | 6
include/asm-powerpc/iseries/iseries_io.h | 6
include/asm-powerpc/iseries/it_exp_vpd_panel.h | 6
include/asm-powerpc/iseries/it_lp_naca.h | 6
include/asm-powerpc/iseries/it_lp_queue.h | 6
include/asm-powerpc/iseries/it_lp_reg_save.h | 4
include/asm-powerpc/iseries/lpar_map.h | 6
include/asm-powerpc/iseries/mf.h | 10
include/asm-powerpc/iseries/vio.h | 10
include/asm-powerpc/kexec.h | 49 +
include/asm-powerpc/machdep.h | 1
include/asm-powerpc/numnodes.h | 7
include/asm-powerpc/ppc_asm.h | 7
include/asm-powerpc/processor.h | 2
include/asm-powerpc/ptrace.h | 143 +-
include/asm-powerpc/rtas.h | 25
include/asm-powerpc/sigcontext.h | 41 -
include/asm-powerpc/smp.h | 45 +
include/asm-powerpc/sparsemem.h | 6
include/asm-powerpc/stat.h | 81 +
include/asm-powerpc/system.h | 48 +
include/asm-powerpc/termios.h | 135 --
include/asm-powerpc/time.h | 2
include/asm-powerpc/tlb.h | 70 +
include/asm-powerpc/tlbflush.h | 146 ++
include/asm-powerpc/uaccess.h | 468 ++++++++
include/asm-powerpc/ucontext.h | 40 +
include/asm-ppc/bitops.h | 460 --------
include/asm-ppc/commproc.h | 2
include/asm-ppc/futex.h | 53 -
include/asm-ppc/ipcbuf.h | 29
include/asm-ppc/kexec.h | 40 -
include/asm-ppc/ptrace.h | 152 ---
include/asm-ppc/sigcontext.h | 15
include/asm-ppc/stat.h | 69 -
include/asm-ppc/tlb.h | 57 -
include/asm-ppc/tlbflush.h | 115 --
include/asm-ppc/uaccess.h | 393 ------
include/asm-ppc/ucontext.h | 27
include/asm-ppc64/bitops.h | 360 ------
include/asm-ppc64/io.h | 2
include/asm-ppc64/ipcbuf.h | 28
include/asm-ppc64/kexec.h | 41 -
include/asm-ppc64/mmu_context.h | 15
include/asm-ppc64/numnodes.h | 7
include/asm-ppc64/nvram.h | 2
include/asm-ppc64/paca.h | 2
include/asm-ppc64/spinlock.h | 2
include/asm-ppc64/stat.h | 60 -
include/asm-ppc64/tlb.h | 39 -
include/asm-ppc64/tlbflush.h | 52 -
include/asm-ppc64/uaccess.h | 341 ------
include/asm-ppc64/ucontext.h | 22
178 files changed, 8701 insertions(+), 4075 deletions(-)
create mode 100644 arch/powerpc/configs/cell_defconfig
create mode 100644 arch/powerpc/configs/g5_defconfig
create mode 100644 arch/powerpc/configs/iseries_defconfig
create mode 100644 arch/powerpc/configs/maple_defconfig
create mode 100644 arch/powerpc/configs/pseries_defconfig
rename include/asm-ppc64/ppc32.h => arch/powerpc/kernel/ppc32.h (86%)
rename arch/{ppc64/kernel/rtas-proc.c => powerpc/kernel/rtas-proc.c} (100%)
rename arch/{ppc64/kernel/rtas_flash.c => powerpc/kernel/rtas_flash.c} (87%)
rename arch/{ppc64/kernel/signal.c => powerpc/kernel/signal_64.c} (100%)
create mode 100644 arch/powerpc/kernel/smp-tbsync.c
rename arch/{ppc64/kernel/smp.c => powerpc/kernel/smp.c} (88%)
rename arch/{ppc64/kernel/bitops.c => powerpc/lib/bitops.c} (55%)
create mode 100644 arch/powerpc/platforms/cell/Makefile
rename arch/{ppc64/kernel/bpa_iic.c => powerpc/platforms/cell/interrupt.c} (98%)
rename arch/{ppc64/kernel/bpa_iic.h => powerpc/platforms/cell/interrupt.h} (93%)
rename arch/{ppc64/kernel/bpa_iommu.c => powerpc/platforms/cell/iommu.c} (95%)
rename arch/{ppc64/kernel/bpa_iommu.h => powerpc/platforms/cell/iommu.h} (92%)
rename arch/{ppc64/kernel/bpa_setup.c => powerpc/platforms/cell/setup.c} (81%)
create mode 100644 arch/powerpc/platforms/cell/smp.c
rename arch/{ppc64/kernel/spider-pic.c => powerpc/platforms/cell/spider-pic.c} (100%)
rename include/asm-ppc64/naca.h => arch/powerpc/platforms/iseries/naca.h (78%)
rename include/asm-ppc64/plpar_wrappers.h => arch/powerpc/platforms/pseries/plpar_wrappers.h (59%)
delete mode 100644 arch/powerpc/platforms/pseries/rtas-fw.c
delete mode 100644 arch/powerpc/platforms/pseries/rtas-fw.h
rename arch/{ppc64/kernel/rtasd.c => powerpc/platforms/pseries/rtasd.c} (100%)
rename include/asm-ppc64/dart.h => arch/powerpc/sysdev/dart.h (94%)
rename arch/{ppc64/kernel/bpa_nvram.c => powerpc/sysdev/mmio_nvram.c} (76%)
delete mode 100644 arch/ppc/kernel/bitops.c
delete mode 100644 arch/ppc64/kernel/smp-tbsync.c
delete mode 100644 arch/ppc64/lib/Makefile
delete mode 100644 arch/ppc64/lib/string.S
create mode 100644 include/asm-powerpc/bitops.h
rename include/{asm-ppc64/futex.h => asm-powerpc/futex.h} (68%)
create mode 100644 include/asm-powerpc/ipcbuf.h
rename include/{asm-ppc64/iSeries/HvCall.h => asm-powerpc/iseries/hv_call.h} (93%)
rename include/{asm-ppc64/iSeries/HvCallEvent.h => asm-powerpc/iseries/hv_call_event.h} (96%)
rename include/{asm-ppc64/iSeries/HvCallSc.h => asm-powerpc/iseries/hv_call_sc.h} (92%)
rename include/{asm-ppc64/iSeries/HvCallXm.h => asm-powerpc/iseries/hv_call_xm.h} (87%)
rename include/{asm-ppc64/iSeries/HvLpConfig.h => asm-powerpc/iseries/hv_lp_config.h} (92%)
rename include/{asm-ppc64/iSeries/HvLpEvent.h => asm-powerpc/iseries/hv_lp_event.h} (96%)
rename include/{asm-ppc64/iSeries/HvTypes.h => asm-powerpc/iseries/hv_types.h} (96%)
rename include/{asm-ppc64/iSeries/iSeries_io.h => asm-powerpc/iseries/iseries_io.h} (93%)
rename include/{asm-ppc64/iSeries/ItExtVpdPanel.h => asm-powerpc/iseries/it_exp_vpd_panel.h} (88%)
rename include/{asm-ppc64/iSeries/ItLpNaca.h => asm-powerpc/iseries/it_lp_naca.h} (95%)
rename include/{asm-ppc64/iSeries/ItLpQueue.h => asm-powerpc/iseries/it_lp_queue.h} (95%)
rename include/{asm-ppc64/iSeries/ItLpRegSave.h => asm-powerpc/iseries/it_lp_reg_save.h} (97%)
rename include/{asm-ppc64/iSeries/LparMap.h => asm-powerpc/iseries/lpar_map.h} (95%)
rename include/{asm-ppc64/iSeries/mf.h => asm-powerpc/iseries/mf.h} (94%)
rename include/{asm-ppc64/iSeries/vio.h => asm-powerpc/iseries/vio.h} (95%)
create mode 100644 include/asm-powerpc/kexec.h
create mode 100644 include/asm-powerpc/numnodes.h
rename include/{asm-ppc64/ptrace.h => asm-powerpc/ptrace.h} (61%)
rename include/{asm-ppc64/sigcontext.h => asm-powerpc/sigcontext.h} (67%)
rename include/{asm-ppc64/smp.h => asm-powerpc/smp.h} (66%)
rename include/{asm-ppc64/sparsemem.h => asm-powerpc/sparsemem.h} (67%)
create mode 100644 include/asm-powerpc/stat.h
create mode 100644 include/asm-powerpc/tlb.h
create mode 100644 include/asm-powerpc/tlbflush.h
create mode 100644 include/asm-powerpc/uaccess.h
create mode 100644 include/asm-powerpc/ucontext.h
delete mode 100644 include/asm-ppc/bitops.h
delete mode 100644 include/asm-ppc/futex.h
delete mode 100644 include/asm-ppc/ipcbuf.h
delete mode 100644 include/asm-ppc/kexec.h
delete mode 100644 include/asm-ppc/ptrace.h
delete mode 100644 include/asm-ppc/sigcontext.h
delete mode 100644 include/asm-ppc/stat.h
delete mode 100644 include/asm-ppc/tlb.h
delete mode 100644 include/asm-ppc/tlbflush.h
delete mode 100644 include/asm-ppc/uaccess.h
delete mode 100644 include/asm-ppc/ucontext.h
delete mode 100644 include/asm-ppc64/bitops.h
delete mode 100644 include/asm-ppc64/ipcbuf.h
delete mode 100644 include/asm-ppc64/kexec.h
delete mode 100644 include/asm-ppc64/numnodes.h
delete mode 100644 include/asm-ppc64/stat.h
delete mode 100644 include/asm-ppc64/tlb.h
delete mode 100644 include/asm-ppc64/tlbflush.h
delete mode 100644 include/asm-ppc64/uaccess.h
delete mode 100644 include/asm-ppc64/ucontext.h
Al Viro:
ppc bug.h namespace pollution
Arnd Bergmann:
powerpc: Rename BPA to Cell
powerpc: create a new arch/powerpc/platforms/cell/smp.c
powerpc: move rtas_fw.c out of platforms/pseries
powerpc: move mmio_nvram.c over to arch/powerpc
powerpc: move arch/ppc64/kernel/bpa* to arch/powerpc/platforms/cell
Becky Bruce:
ppc: Fix build warnings in arch/ppc/kernel/traps.c
David Gibson:
powerpc: Merge ipcbuf.h
powerpc: Merge bitops.h
powerpc: Fix merged ipcbuf.h
powerpc: Merge futex.h
powerpc: Merge (move) numnodes.h and sparsemem.h
powerpc: Move dart.h
powerpc: Move naca.h to platforms/iseries
powerpc: Keep fixing merged ipcbuf.h
David Woodhouse:
powerpc: always init nvram on 64-bit powermac
John Rose:
ppc64: Fix add notifier crashes
Kelly Daly:
merge filename and modify references to iseries/hv_call.h
merge filename and modify references to iseries/hv_call_event.h
merge filename and modify references to iseries/hv_call_sc.h
merge filename and modify references to iseries/hv_call_xm.h
merge filename and modify reference to iseries/hv_lp_config.h
merge filename and modify references to iseries/hv_lp_event.h
merge filename and modify references to iseries/hv_types.h
merge filename and modify references to iseries/it_exp_vpd_panel.h
merge filename and modify references to iseries/it_lp_naca.h
merge filename and modify references to iseries/it_lp_queue.h
merge filename and modify references to iseries/it_lp_reg_save.h
merge filename and modify references to iseries/lpar_map.h
merge filename and modify references to iseries/iseries_io.h
merge filename and modify references to iSeries/mf.h
merge filename and modify references to iseries/vio.h
fix incorrect dir
modify defines according to _ASM_POWERPC_ISERIES_
Marcelo Tosatti:
ppc32 8xx: export symbols required for modular IDE
ppc32 8xx: Fix harmless warning in 8xx_io/commproc.c
ppc32 8xx: fix cpm_dpalloc() comment
Michael Ellerman:
powerpc: Copy default configs into arch/powerpc/configs
powerpc: Make set_dabr() a ppc_md function
powerpc: Move plpar_wrappers.h into arch/powerpc/platforms/pseries
powerpc: Merge asm-ppc/kexec.h and asm-ppc64/kexec.h
powerpc: Make early debugging fit on 80 character terminal
powerpc: Set entry point and text address in linker script
powerpc: Add helper functions for synthesising instructions at runtime
powerpc: Cleanup vpa code
powerpc: Implement smp_release_cpus() in C not asm
powerpc: Fix random memory corruption in merged elf.h
Merge with Paulus
Paul Mackerras:
powerpc: Fix BUG/WARN macros for 64-bit
powerpc: Fix pseries (64-bit) build
powerpc: Use rtas_call not call_rtas in CHRP code
powerpc: Fix compile error with CONFIG_TAU=y
powerpc: exclude powerbook sleep code with CONFIG_PPC64 and CONFIG_PM
Merge git://oak/home/sfr/kernels/iseries/work
powerpc: clean up bug.h further
Merge ../linux-2.6
powerpc: include lmb.h in arch/powerpc/platforms/powermac/setup.c
powerpc: include <linux/platform_device.h> in pegasos_eth.c
powerpc: Compile fixes for chrp/nvram.c
powerpc: Merge remaining RTAS code
Merge git://oak/home/sfr/kernels/iseries/work
powerpc: Merge smp-tbsync.c (the generic timebase sync routine)
Merge branch 'for-paulus' of git://kernel/home/michael/src/work/
Merge git://oak/home/sfr/kernels/iseries/work
powerpc: Merge smp.c and smp.h
powerpc: Fix vmlinux.lds.S for 32-bit
Stephen Rothwell:
powerpc: merge uaccess.h
powerpc: fix __strnlen_user in merge tree
powerpc: make mem= work on iSeries again
powerpc: remove duplicate ioctl definitions
powerpc: use asm-generic/termios.h
powerpc: clean up uaccess.h
Merge iSeries include file move
Merge Paulus' tree
powerpc: merge stat.h
powerpc: merge ptrace.h
powerpc: move ppc64/kernel/signal.c to arch/powerpc
powerpc: move include/asm-ppc64/ppc32.h to arch/powerpc/kernel
powerpc: merge sigcontext.h
powerpc: merge ucontext.h
powerpc: merge tlb.h
powerpc: merge tlbflush.h
Vitaly Bordug:
ppc32: Fixed warning in m8xx_setup.c
^ permalink raw reply
* Required functions for relocating not part of relocate section
From: Marcelo Tosatti @ 2005-11-04 18:06 UTC (permalink / raw)
To: Paul Mackerras, linux-ppc-embedded
Hi Paul,
Recent 2.6-git (from Wednesday) tree fails to boot on 8xx due to:
BDI>i
Target state : debug mode
Debug entry cause : trace
Current PC : 0x005ba8e8
BDI>md 0x005ba8e8
005ba8e8 : 00000000 00000000 00000000 00000000 ................
005ba8f8 : 00000000 00000000 00000000 00000000 ................
005ba908 : 00000000 00000000 00000000 00000000 ................
005ba918 : 00000000 00000000 00000000 00000000 ................
005ba928 : 00000000 00000000 00000000 00000000 ................
...
BDI>go
- TARGET: stopped
BDI>i
Target state : debug mode
Debug entry cause : software emulation exception
Current PC : 0x005ba8e8
Problem is that flush_instruction_cache (and flush_data_cache)
from boot/common/util.S are not being copied to the relocate section,
even though the file contains the proper entry:
.section ".relocate_code","xa"
/*
* Flush and enable instruction cache
* First, flush the data cache in case it was enabled and may be
* holding instructions for copy back.
*/
_GLOBAL(flush_instruction_cache)
Here is the disassemble of the relocate section:
004047a0 <__relocate_start>:
4047a0: 38 c0 00 00 li r6,0
4047a4: 7c e9 03 a6 mtctr r7
4047a8: 3c 80 00 40 lis r4,64
4047ac: 60 84 00 20 ori r4,r4,32
4047b0: 7d 03 43 78 mr r3,r8
4047b4: 7c 04 18 00 cmpw r4,r3
4047b8: 41 81 00 20 bgt- 4047d8 <do_relocate_from_end>
004047bc <do_relocate_from_start>:
4047bc: 80 a3 00 00 lwz r5,0(r3)
4047c0: 90 a4 00 00 stw r5,0(r4)
4047c4: 38 63 00 04 addi r3,r3,4
4047c8: 38 84 00 04 addi r4,r4,4
4047cc: 7c c6 2a 78 xor r6,r6,r5
4047d0: 42 00 ff ec bdnz+ 4047bc <do_relocate_from_start>
4047d4: 48 00 00 24 b 4047f8 <do_relocate_out>
004047d8 <do_relocate_from_end>:
4047d8: 3c 60 00 5b lis r3,91
4047dc: 60 63 d3 40 ori r3,r3,54080
4047e0: 54 e4 10 3a rlwinm r4,r7,2,0,29
4047e4: 7c 88 22 14 add r4,r8,r4
4047e8: 84 a4 ff fc lwzu r5,-4(r4)
4047ec: 94 a3 ff fc stwu r5,-4(r3)
4047f0: 7c c6 2a 78 xor r6,r6,r5
4047f4: 42 00 ff f4 bdnz+ 4047e8 <do_relocate_from_end+0x10>
004047f8 <do_relocate_out>:
4047f8: 3c 60 00 40 lis r3,64
4047fc: 60 63 01 14 ori r3,r3,276
404800: 7c 68 03 a6 mtlr r3
404804: 4b ff d5 40 b 401d44 <flush_instruction_cache>
Disassembly of section .data:
Replacing "b flush_instruction_cache" with "ba flush_instruction_cache"
makes the system boot.
The problem does not exist on v2.6.14.
Any clues??
^ permalink raw reply
* Re: 2.6.14 USB vs. sleep issues
From: Benjamin Herrenschmidt @ 2005-11-04 21:48 UTC (permalink / raw)
To: Vivenzio Pagliari
Cc: linuxppc-dev list, debian-powerpc@lists.debian.org,
Eddy Petrişor
In-Reply-To: <436BB734.5010409@web.de>
On Fri, 2005-11-04 at 20:32 +0100, Vivenzio Pagliari wrote:
> Benjamin Herrenschmidt wrote:
> >
> > I would say your first mistake is to use PREEMPT :) There are various
> > issues with PREEMPT on ppc32 that have not really been addressed so far,
> > and the USB code has some "holes" that I wouldn't trust in a PREEMPT
> > environment.
> >
>
> What do you mean exactly? Should CONFIG_PREEMPT not be used?
> And what about CONFIG_PREEMPT_VOLUNTARY?
I would avoid both for now.
Ben.
^ permalink raw reply
* Re: Board Bringup problem with 2.6.13.4
From: David H. Lynch Jr @ 2005-11-04 20:24 UTC (permalink / raw)
To: linuxppc-embedded
In-Reply-To: <43688AAD.5050208@comcast.net>
David H. Lynch Jr wrote:
I am working through bringing up Linux 2.6.14 on a Xilinx V4 based
ppc405. with memory from 0x0 through 0x7fffffff
I get to this point in head_4xx.S:
/* We now have the lower 16 Meg mapped into TLB entries, and the caches
* ready to work.
*/
turn_on_mmu:
lis r0,MSR_KERNEL@h
ori r0,r0,MSR_KERNEL@l
mtspr SPRN_SRR1,r0
lis r0,start_here@h // SPRN_SRR0 is where the rfi
resumes execution
ori r0,r0,start_here@l
mtspr SPRN_SRR0,r0
SYNC
rfi /* enables MMU */
b . /* prevent prefetch past rfi */
The value of SPRN_SRRO is 0xffffc00000002218 and SPRN_SRR1 is
0x0000000200001032
I have not checked the bits in SPRN_SRR1 but isn't 0xffffc00000002218
wrong ? it looks like it was sign
extended. physical 0x2218 is start_here so that part is corect.
^ permalink raw reply
* Re: Board Bringup problem with 2.6.13.4
From: David H. Lynch Jr @ 2005-11-04 20:27 UTC (permalink / raw)
To: linuxppc-embedded
In-Reply-To: <43688AAD.5050208@comcast.net>
I am working through bringing up Linux 2.6.14 on a Xilinx V4 based
ppc405. with memory from 0x0 through 0x7fffffff
I have a debugging port at XPAR_KEYHOLE, I basically copied the code to
setup a tlb entry for the serial debugging console to get an additional
entry for my debugging port.
I am not particularly sharp on memory management.
Can I just cut and paste that code changing the address, and the tlb
slot as below ?
/* Load a TLB entry for the Keyhole, We use a 4k real==virtual
mapping. */
lis r3,XPAR_KEYHOLE@h
ori r3,r3,XPAR_KEYHOLE@l
mr r4,r3
clrrwi r4,r4,12
ori r4,r4,(TLB_WR|TLB_I|TLB_M|TLB_G)
clrrwi r3,r3,12
ori r3,r3,(TLB_VALID | TLB_PAGESZ(PAGESZ_4K))
li r0,1 /* TLB slot 1 */
tlbwe r4,r0,TLB_DATA
tlbwe r3,r0,TLB_TAG
^ permalink raw reply
* Re: 2.6.14 USB vs. sleep issues
From: Vivenzio Pagliari @ 2005-11-04 19:32 UTC (permalink / raw)
To: Benjamin Herrenschmidt
Cc: linuxppc-dev list, debian-powerpc@lists.debian.org,
Eddy Petrişor
In-Reply-To: <1131088730.4680.251.camel@gaston>
Benjamin Herrenschmidt wrote:
>
> I would say your first mistake is to use PREEMPT :) There are various
> issues with PREEMPT on ppc32 that have not really been addressed so far,
> and the USB code has some "holes" that I wouldn't trust in a PREEMPT
> environment.
>
What do you mean exactly? Should CONFIG_PREEMPT not be used?
And what about CONFIG_PREEMPT_VOLUNTARY?
Vivenzio
^ permalink raw reply
* Re: ppc32/64 merge
From: Linus Torvalds @ 2005-11-04 19:20 UTC (permalink / raw)
To: Paul Mackerras, linuxppc-dev; +Cc: Andrew Morton
In-Reply-To: <17249.30677.31240.212459@cargo.ozlabs.ibm.com>
Paul, I get:
arch/ppc64/include/asm/elf.h:190:8: warning: memset with byte count of -160
when checking ppc64 with sparse.
It looks like it's even correct. I think elf_gregset_t gets set to
elf_gregset_t32, which is why "struct pt_regs" is so much bigger than
elf_gregset_t.
Maybe it's a sparse bug. And maybe it isn't.
Linus
^ permalink raw reply
* Re: [PATCH 2.6.14] ppc32: Allow for bigger compressed kernels
From: Matt Porter @ 2005-11-04 15:00 UTC (permalink / raw)
To: Tom Rini; +Cc: linuxppc-dev, Andrew Morton
In-Reply-To: <20051104145027.GQ3839@smtp.west.cox.net>
On Fri, Nov 04, 2005 at 07:50:27AM -0700, Tom Rini wrote:
> On Thu, Nov 03, 2005 at 08:25:24PM -0800, Olof Johansson wrote:
> > On Thu, Nov 03, 2005 at 11:32:56AM -0700, Tom Rini wrote:
> >
> > > --- a/arch/ppc/boot/simple/misc.c
> > > +++ b/arch/ppc/boot/simple/misc.c
> > > @@ -7,10 +7,10 @@
> > > * your serial console. If a machine meets these requirements, it can quite
> > > * likely use this code during boot.
> > > *
> > > - * Author: Matt Porter <mporter@mvista.com>
> > > + * Author: Tom Rini <trini@mvista.com>
> > > * Derived from arch/ppc/boot/prep/misc.c
> >
> > I understand adding authors to a file when code is added, but why should
> > author credit be removed?
>
> It wasn't Matt's code really. I know he did the 44x EMAC fixes, but
> other than that it was my code, heavily cribbed from all of the old
> per-board bootwrappers, that were cribbed from the prep one.
Yes, I think what happened was that when you rewrote the arch/ppc/boot/
stuff, you started with the a version of the file I had written for one
of my platforms which is where my name came to stick in there.
The details are hazy in my memory as to how I came to be the "sole
author" of this code. :) In any case, I think having you attributed as
the author of this stuff is appropriate and I can be removed.
-Matt
^ permalink raw reply
* Re: [PATCH 2.6.14] ppc32: Allow for bigger compressed kernels
From: Tom Rini @ 2005-11-04 14:50 UTC (permalink / raw)
To: Olof Johansson; +Cc: Andrew Morton, linuxppc-dev
In-Reply-To: <20051104042524.GD8515@pb15.lixom.net>
On Thu, Nov 03, 2005 at 08:25:24PM -0800, Olof Johansson wrote:
> On Thu, Nov 03, 2005 at 11:32:56AM -0700, Tom Rini wrote:
>
> > --- a/arch/ppc/boot/simple/misc.c
> > +++ b/arch/ppc/boot/simple/misc.c
> > @@ -7,10 +7,10 @@
> > * your serial console. If a machine meets these requirements, it can quite
> > * likely use this code during boot.
> > *
> > - * Author: Matt Porter <mporter@mvista.com>
> > + * Author: Tom Rini <trini@mvista.com>
> > * Derived from arch/ppc/boot/prep/misc.c
>
> I understand adding authors to a file when code is added, but why should
> author credit be removed?
It wasn't Matt's code really. I know he did the 44x EMAC fixes, but
other than that it was my code, heavily cribbed from all of the old
per-board bootwrappers, that were cribbed from the prep one.
--
Tom Rini
http://gate.crashing.org/~trini/
^ permalink raw reply
* Re: [PATCH] ppc32: Put CPM1 config option
From: Pantelis Antoniou @ 2005-11-04 10:29 UTC (permalink / raw)
To: David Jander; +Cc: linuxppc-embedded
In-Reply-To: <200511041133.23086.david.jander@protonic.nl>
David Jander wrote:
> On Thursday 03 November 2005 19:39, Pantelis Antoniou wrote:
>
>>[...]
>>+config CPM1
>>+ bool
>>+ depends on 8xx
>>+ default y
>>+ help
>>+ The CPM1 (Communications Processor Module) is a coprocessor on
>>+ embedded CPUs made by Motorola. Selecting this option means that
>>+ you wish to build a kernel for a machine with a CPM1 coprocessor
>>+ on it (8xx, 827x, 8560).
>
>
> Not that the help of a hidden bool is of much importance, but what have the
> mpc827x and mpc8560 to do with a CPM1? Those are PQ2 processors AFAIK.
> Why does this option have a help anyway?
>
> Greetings,
>
Nothing - I was posted in a hurry.
Cut and paste :\
-- Pantelis
^ permalink raw reply
* Re: [PATCH] ppc32: Put CPM1 config option
From: David Jander @ 2005-11-04 10:33 UTC (permalink / raw)
To: linuxppc-embedded
In-Reply-To: <200511032039.27395.pantelis.antoniou@gmail.com>
On Thursday 03 November 2005 19:39, Pantelis Antoniou wrote:
>[...]
> +config CPM1
> + bool
> + depends on 8xx
> + default y
> + help
> + The CPM1 (Communications Processor Module) is a coprocessor on
> + embedded CPUs made by Motorola. Selecting this option means that
> + you wish to build a kernel for a machine with a CPM1 coprocessor
> + on it (8xx, 827x, 8560).
Not that the help of a hidden bool is of much importance, but what have the
mpc827x and mpc8560 to do with a CPM1? Those are PQ2 processors AFAIK.
Why does this option have a help anyway?
Greetings,
--
David Jander
^ permalink raw reply
* Re: 2.6.14 USB vs. sleep issues
From: Benjamin Herrenschmidt @ 2005-11-04 7:18 UTC (permalink / raw)
To: Eddy Petrişor; +Cc: linuxppc-dev list, debian-powerpc@lists.debian.org
In-Reply-To: <60381eeb0511032313i426db0c8o7254009240f6988a@mail.gmail.com>
> > Heh, in _theory_ :) The first aim of the patch is to remove the crash on
> > sleep/wakeup in 2.6.14. If it doesn't blow up, that's already a good
>
> Well, I couldn't get to that point (getting back from sleep) :-D
>
> > first step :) Wether suspend with your USB stick works is a different
> > matter, mostly due to the USB stack itself.
>
> The kernel oopsed when it was supposed to go to sleep:
I would say your first mistake is to use PREEMPT :) There are various
issues with PREEMPT on ppc32 that have not really been addressed so far,
and the USB code has some "holes" that I wouldn't trust in a PREEMPT
environment.
Anyway, I'll try to come up with a better patch this week-end. Please,
continue giving me feedback with oops backtraces etc...
Ben.
^ permalink raw reply
* Re: 2.6.14 USB vs. sleep issues
From: Eddy Petrişor @ 2005-11-04 7:13 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list, debian-powerpc@lists.debian.org
In-Reply-To: <1131052876.4680.78.camel@gaston>
On 11/3/05, Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
> > So this supposed to work with the USB sleep support enabled, right?
> > If this works then I will be very thankful!
> > I hope I have the time to test this patch this evening.
> >
> > > Note that the patch is totally untested here so it may be just plain
> > > bogus :)
> >
> > No problem.
> >
> > AIUI, this should allow me to put my PB 5,2 to sleep while a usb stick
> > is mounted and come back from sleep with no problem and the stick to
> > be still mounted, right?
>
> Heh, in _theory_ :) The first aim of the patch is to remove the crash on
> sleep/wakeup in 2.6.14. If it doesn't blow up, that's already a good
Well, I couldn't get to that point (getting back from sleep) :-D
> first step :) Wether suspend with your USB stick works is a different
> matter, mostly due to the USB stack itself.
The kernel oopsed when it was supposed to go to sleep:
Nov 4 09:01:34 localhost kernel: usb 3-1: no poweroff yet, suspending inst=
ead
Nov 4 09:01:34 localhost kernel: usb usb4: no poweroff yet, suspending ins=
tead
Nov 4 09:01:34 localhost kernel: Oops: Exception in kernel mode, sig: 5 [#=
1]
Nov 4 09:01:34 localhost kernel: PREEMPT
Nov 4 09:01:34 localhost kernel: NIP: C00184F4 LR: D224199C SP:
CD7D5D00 REGS: cd7d5c50 TRAP: 0700 Not tainted
Nov 4 09:01:34 localhost kernel: MSR: 00029032 EE: 1 PR: 0 FP: 0 ME:
1 IR/DR: 11
Nov 4 09:01:34 localhost kernel: TASK =3D cec8f2e0[2751] 'pbbuttonsd'
THREAD: cd7d4000
Nov 4 09:01:34 localhost kernel: Last syscall: 54
Nov 4 09:01:34 localhost kernel: GPR00: 00000001 CD7D5D00 CEC8F2E0
00000001 00001000 00001000 000007D0 FFFFFFFC
Nov 4 09:01:34 localhost kernel: GPR08: D220C064 CD7D4000 00000000
00000000 0000D903 1002C830 100D0000 100E2CB8
Nov 4 09:01:34 localhost kernel: GPR16: 100D0000 100A0000 00000000
100D0000 100EC488 10010000 10010000 D20C0000
Nov 4 09:01:34 localhost kernel: GPR24: D20C0000 D20C0000 C0310000
00000000 C0300000 00000006 CF3EDC00 CF3EDCD0
Nov 4 09:01:34 localhost kernel: NIP [c00184f4] sub_preempt_count+0x14/0x7=
0
Nov 4 09:01:34 localhost kernel: LR [d224199c]
ehci_hub_suspend+0x1ac/0x210 [ehci_hcd]
Nov 4 09:01:34 localhost kernel: Call trace:
Nov 4 09:01:34 localhost kernel: [d20b47e4]
hcd_hub_suspend+0x34/0x50 [usbcore]
Nov 4 09:01:34 localhost kernel: [d20b2958]
__usb_suspend_device+0x308/0x330 [usbcore]
Nov 4 09:01:34 localhost kernel: [d20b2ae0]
usb_suspend_device+0x40/0x70 [usbcore]
Nov 4 09:01:34 localhost kernel: [d20aead0]
usb_generic_suspend+0xa0/0xb0 [usbcore]
Nov 4 09:01:34 localhost kernel: [c01d7904] suspend_device+0x104/0x160
Nov 4 09:01:34 localhost kernel: [c01d7b40] device_suspend+0x110/0x320
Nov 4 09:01:34 localhost kernel: [c037d6b0] pmac_suspend_devices+0x50/0x1=
d0
Nov 4 09:01:34 localhost kernel: [c037de58] pmu_ioctl+0x388/0x9f0
Nov 4 09:01:34 localhost kernel: [c00961dc] do_ioctl+0x9c/0xb0
Nov 4 09:01:34 localhost kernel: [c009627c] vfs_ioctl+0x8c/0x4c0
Nov 4 09:01:34 localhost kernel: [c0096744] sys_ioctl+0x94/0xb0
Nov 4 09:01:34 localhost kernel: [c0004840] ret_from_syscall+0x0/0x44
--
Regards,
EddyP
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
"Imagination is more important than knowledge" A.Einstein
^ permalink raw reply
* Re: SM501 Frame Buffer driver on PPC
From: Jarno Manninen @ 2005-11-04 4:34 UTC (permalink / raw)
To: linuxppc-embedded
In-Reply-To: <47F3F98010FF784EBEE6526EAAB078D1C05E6C@tq-mailsrv.tq-net.de>
On Thursday 03 November 2005 16:16, Martin Krause wrote:
> Mark Chambers wrote on Thursday, November 03, 2005 3:06 PM:
> > > The endianess on PCI on ppc is still an issue (I haven't
> > > investigated this problem further during the last month).
> >
> > There really shouldn't be an endian issue on SM501 since registers are
> > 32 bit. What we do have is the 5200 that does byte swapping on PCI
> > for no good reason (IMHO)
Actually the 5200 does _not_ change the order of bytes written on the PCI bus,
but just the bytelanes. Why? Consider this. We have two mapped entities and
some data in system memory.
struct something {
char 1;
char 2;
char 3;
char 4;
};
/* Mapped memory from PCI bus */
struct something *device_memory;
uint32_t *device_register;
/* And local data */
struct something system_memory = { 0x11, 0x22, 0x33, 0x44 };
uint32_t value = 0x11223344;
And we transfer data from system memory to PCI device.
memcpy(device_memory, &system_memory, sizeof(struct something));
*device_register = value;
These both would create 32-bit access to the PCI device( I suppose :), but if
we just blindly swap or don't swap written bytes the result is mess:
Swapping
Item With Without
struct { 0x44, 0x33, 0x22, 0x11 } { 0x11, 0x22, 0x33, 0x44 }
integer 0x44331100 0x11223344
Result Integer OK Struct OK
Struct messed Integer messed
So the actual problem is that there is no feasible way to determine if a
access of given width needs to be swapped on the "bus-level". So basically it
is left to user to decide when the swapping is needed. But of course this can
be taken care on the device level with clever planning.
I hope I didn't get it all too wrong. :)
> We experienced a byte swapping issue on the SM501, too, although it
> is connected via the local plus bus with the MPC5200 and not via PCI
> bus.
>
> In 16 bpp mode bytes appear to be swapped in a very ugly way.
> Unfortunately we have no explanation for this, nor a real
> workaround.
Yes, the byteswap implementation on SMI-chips is quite braindead. They have
Input 1234
Swap1 4321
Swap2 3412
When what we really need is:
Swap 2143
IMHO the easiest way is to use 24-bit mode that can be usually handled only by
changing the byte-offsets.
- Jarno
^ permalink raw reply
* Re: [PATCH 2.6.14] ppc32: Allow for bigger compressed kernels
From: Olof Johansson @ 2005-11-04 4:25 UTC (permalink / raw)
To: Tom Rini; +Cc: Andrew Morton, linuxppc-dev
In-Reply-To: <20051103183256.GJ3839@smtp.west.cox.net>
On Thu, Nov 03, 2005 at 11:32:56AM -0700, Tom Rini wrote:
> --- a/arch/ppc/boot/simple/misc.c
> +++ b/arch/ppc/boot/simple/misc.c
> @@ -7,10 +7,10 @@
> * your serial console. If a machine meets these requirements, it can quite
> * likely use this code during boot.
> *
> - * Author: Matt Porter <mporter@mvista.com>
> + * Author: Tom Rini <trini@mvista.com>
> * Derived from arch/ppc/boot/prep/misc.c
I understand adding authors to a file when code is added, but why should
author credit be removed?
-Olof
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox