* Re: [PATCH] Fix compilation for non CONFIG_HOTPLUG case
From: Sergei Shtylyov @ 2007-07-29 16:45 UTC (permalink / raw)
To: niklaus.giger; +Cc: linux-kernel, kristen.c.accardi, linuxppc-embedded
In-Reply-To: <200707291807.52042.niklaus.giger@member.fsf.org>
Hello.
Niklaus Giger wrote:
> Fixes compilation issues for embedded boards which do not support HOTPLUG
> Signed-off-by: Niklaus Giger <niklaus.giger@member.fsf.org>
> diff --git a/drivers/base/core.c b/drivers/base/core.c
> index 3599ab2..a09bfc8 100644
> --- a/drivers/base/core.c
> +++ b/drivers/base/core.c
> @@ -24,7 +24,9 @@
> #include "base.h"
> #include "power/power.h"
>
> +#ifdef CONFIG_HOTPLUG
> extern const char *kobject_actions[];
> +#endif
No need for #ifdef around extern declarations.
> int (*platform_notify)(struct device * dev) = NULL;
> int (*platform_notify_remove)(struct device * dev) = NULL;
> @@ -306,11 +308,13 @@ static ssize_t store_uevent(struct device *dev, struct
> device_attribute *attr,
> const char *buf, size_t count)
> {
> size_t len = count;
> +#ifdef CONFIG_HOTPLUG
> enum kobject_action action;
> -
> +#endif
Please don't remove newline between the declaration block and the code.
> if (len && buf[len-1] == '\n')
> len--;
>
> +#ifdef CONFIG_HOTPLUG
> for (action = 0; action < KOBJ_MAX; action++) {
> if (strncmp(kobject_actions[action], buf, len) != 0)
> continue;
> @@ -319,11 +323,14 @@ static ssize_t store_uevent(struct device *dev, struct
> device_attribute *attr,
> kobject_uevent(&dev->kobj, action);
> goto out;
Grr... cleanup style abuse -- ISO a mere return they used goto. :-/
> }
> +#endif
>
> dev_err(dev, "uevent: unsupported action-string; this will "
> "be ignored in a future kernel version\n");
> kobject_uevent(&dev->kobj, KOBJ_ADD);
> +#ifdef CONFIG_HOTPLUG
> out:
> +#endif
Well, #ifdef'ing out label seems too much.
> return count;
> }
WBR, Sergei
^ permalink raw reply
* Re: [PATCH] Fix compilation for non CONFIG_HOTPLUG case
From: Gabriel C @ 2007-07-29 17:07 UTC (permalink / raw)
To: Sergei Shtylyov
Cc: niklaus.giger, linux-kernel, kristen.c.accardi, linuxppc-embedded
In-Reply-To: <46ACC42E.8040907@ru.mvista.com>
This problem is already fixed in -mm .
http://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.23-rc1/2.6.23-rc1-mm1/broken-out/gregkh-driver-kobject-fix-link-error-when-config_hotplug-is-disabled.patch
Regards,
Gabriel
^ permalink raw reply
* Using video memory on PS3 e.g. as SWAP?
From: René Rebe @ 2007-07-29 17:04 UTC (permalink / raw)
To: linuxppc-dev
Hi all,
looking at the PS3 as one of the few PowerPC workstation options the RAM
is obviously quite limitted with just 256MB. I wonder if the 256MB of
video memory can be mapped or at least be used as super-fast SWAP?
Or are there news regarding accessing the video chip from Linux beside
the unaccelerated frame-buffer?
Regards,
=2D-=20
Ren=E9 Rebe - ExactCODE GmbH - Europe, Germany, Berlin
http://exactcode.de | http://t2-project.org | http://rene.rebe.name
^ permalink raw reply
* [PATCH] ppc: chipsfb.c build fix for CONFIG_PM
From: Mariusz Kozlowski @ 2007-07-29 17:50 UTC (permalink / raw)
To: paulus, Andrew Morton, pavel, rjw; +Cc: linuxppc-dev, linux-kernel
Hello,
This patch fixes the following build error on powerpc:
CC drivers/video/chipsfb.o
drivers/video/chipsfb.c: In function 'chipsfb_pci_suspend':
drivers/video/chipsfb.c:461: error: 'PM_SUSPEND_MEM' undeclared (first use in this function)
drivers/video/chipsfb.c:461: error: (Each undeclared identifier is reported only once
drivers/video/chipsfb.c:461: error: for each function it appears in.)
make[2]: *** [drivers/video/chipsfb.o] Blad 1
make[1]: *** [drivers/video] Blad 2
make: *** [drivers] Blad 2
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/video/chipsfb.c | 12751 -> 12804 (+53 bytes)
drivers/video/chipsfb.o | -> 112880 ( bytes)
drivers/video/chipsfb.c | 5 +++++
1 file changed, 5 insertions(+)
--- linux-2.6.23-rc1-mm1-a/drivers/video/chipsfb.c 2007-07-26 13:07:41.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/video/chipsfb.c 2007-07-29 19:34:15.000000000 +0200
@@ -27,6 +27,11 @@
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/console.h>
+
+#ifdef CONFIG_PM
+#include <linux/suspend.h>
+#endif
+
#include <asm/io.h>
#ifdef CONFIG_PMAC_BACKLIGHT
^ permalink raw reply
* Re: [PATCH 3/5 v3] Add the platform device support with RapidIO to MPC8641HPCN platform.
From: Arnd Bergmann @ 2007-07-29 13:56 UTC (permalink / raw)
To: linuxppc-dev; +Cc: linux-kernel, paulus
In-Reply-To: <11854393753986-git-send-email-wei.zhang@freescale.com>
On Thursday 26 July 2007, Zhang Wei wrote:
> +
> +static struct of_device_id mpc86xx_of_ids[] =3D {
> +=A0=A0=A0=A0=A0=A0=A0{ .type =3D "soc", },
> +=A0=A0=A0=A0=A0=A0=A0{ .compatible =3D "fsl,rapidio-delta", },
> +=A0=A0=A0=A0=A0=A0=A0{},
> +};
With the device tree source you have posted in 2/5, the rapidio node is
a child of the soc bus, and it doesn't have any children of its own.
Therefore it is completely equivalent to _only_ add the soc type
to mpc86xx_of_ids[], as in=20
static struct of_device_id mpc86xx_of_ids[] =3D {
{ .type =3D "soc", },
{},
};
Even if you intend to add children to the rapidio node in the future,
I'd think it would be more appropriate to have those scanned by
the rapidio bus driver, not by of_platform.
Arnd <><
^ permalink raw reply
* Re: [PATCH 2/2] powerpc: MPC85xx EDAC device driver
From: Arnd Bergmann @ 2007-07-29 14:06 UTC (permalink / raw)
To: linuxppc-dev; +Cc: norsk5, bluesmoke-devel
In-Reply-To: <20070726222225.GB10427@blade.az.mvista.com>
On Friday 27 July 2007, Dave Jiang wrote:
> +static struct of_device_id mpc85xx_pci_err_of_match[] =3D {
> + {
> + .type =3D "pci",
> + .compatible =3D "fsl,mpc8540-pci",
> + },
> + {},
> +};
> +
> +static struct of_platform_driver mpc85xx_pci_err_driver =3D {
> + .owner =3D THIS_MODULE,
> + .name =3D "mpc85xx_pci_err",
> + .match_table =3D mpc85xx_pci_err_of_match,
> + .probe =3D mpc85xx_pci_err_probe,
> + .remove =3D mpc85xx_pci_err_remove,
> + .driver =3D {
> + .name =3D "mpc85xx_pci_err",
> + .owner =3D THIS_MODULE,
> + },
> +};
This is a little problematic, if we want to make the PCI bus implementation
use the PCI code from arch/powerpc/kernel/of_platform.c in the future.
Right now this is not possible, because that code is still 64-bit only,
but that may change in the future. Since only one driver can bind
to the pci host bridge device, the mpc85xx_pci_err driver would conflict
with the PCI driver itself, which you probably don't intend.
I'd suggest either to integrate EDAC into the 85xx specific PCI code,
or to have an extra device in the device tree for this.
> +=A0=A0=A0=A0=A0=A0=A0res =3D of_register_platform_driver(&mpc85xx_mc_err=
_driver) ? : res;
> +
> +=A0=A0=A0=A0=A0=A0=A0res =3D of_register_platform_driver(&mpc85xx_l2_err=
_driver) ? : res;
> +
> +#ifdef CONFIG_PCI
> +=A0=A0=A0=A0=A0=A0=A0res =3D of_register_platform_driver(&mpc85xx_pci_er=
r_driver) ? : res;
> +#endif
> +
> +=A0=A0=A0=A0=A0=A0=A0/*
> +=A0=A0=A0=A0=A0=A0=A0 * need to clear HID1[RFXE] to disable machine chec=
k int
> +=A0=A0=A0=A0=A0=A0=A0 * so we can catch it
> +=A0=A0=A0=A0=A0=A0=A0 */
> +=A0=A0=A0=A0=A0=A0=A0if (edac_op_state =3D=3D EDAC_OPSTATE_INT) {
> +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0orig_hid1 =3D mfspr(SPRN_HI=
D1);
> +
> +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0mtspr(SPRN_HID1, (orig_hid1=
& ~0x20000));
> +=A0=A0=A0=A0=A0=A0=A0}
> +
> +=A0=A0=A0=A0=A0=A0=A0return res;
> +}
The error handling could use some improvement here. In particular, you shou=
ld
unregister the buses in the failure path, maybe you need to clean up other
parts as well.
Arnd <><
^ permalink raw reply
* Re: [2.6 patch] arch/powerpc/Kconfig: fix the EMBEDDED6xx dependencies
From: Arnd Bergmann @ 2007-07-29 19:31 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Andrew Morton, Paul Mackerras, linux-kernel, Adrian Bunk
In-Reply-To: <20070728152704.GA30976@stusta.de>
On Saturday 28 July 2007, Adrian Bunk wrote:
> On Mon, Dec 04, 2006 at 02:06:34PM +1100, Paul Mackerras wrote:
> > Adrian Bunk writes:
> >
> > > This patch changes the EMBEDDED6xx dependencies to the equivalent
> > > dependency that seems to have been intended.
> >
> > Nack - CONFIG_EMBEDDED6xx is going away entirely, soon.
>
> Still there - and still with this strange dependency.
The last time I sent my patch to clean up CONFIG_EMBEDDED6xx and a few
other Kconfig options I still left it intact, but it becomes unnecessary
after that.
I still think that having high-level options like
* embedded6xx
* MPC7448HPC2
* holly
* linkstation
* PPC_83xx
* MPC8313_RDB
* MPC832x_MDS
* MPC832x_RDB
helps keep the platform selection more structured and readable, but the
dependency on !SMP should probably go into the individual platforms that
are actually broken, if any, not into the high-level option.
Arnd <><
^ permalink raw reply
* Re: [PATCH] ppc: chipsfb.c build fix for CONFIG_PM
From: Mariusz Kozlowski @ 2007-07-29 21:31 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: linuxppc-dev, Andrew Morton, paulus, pavel, linux-kernel
In-Reply-To: <200707292333.12766.rjw@sisk.pl>
> > This patch fixes the following build error on powerpc:
> >
> > CC drivers/video/chipsfb.o
> > drivers/video/chipsfb.c: In function 'chipsfb_pci_suspend':
> > drivers/video/chipsfb.c:461: error: 'PM_SUSPEND_MEM' undeclared (first use in this function)
> > drivers/video/chipsfb.c:461: error: (Each undeclared identifier is reported only once
> > drivers/video/chipsfb.c:461: error: for each function it appears in.)
> > make[2]: *** [drivers/video/chipsfb.o] Blad 1
> > make[1]: *** [drivers/video] Blad 2
> > make: *** [drivers] Blad 2
>
> Already fixed in the right way. Please see:
> http://www.mail-archive.com/mm-commits@vger.kernel.org/msg22171.html
Ah... ok. Didn't see that.
Thanks,
Mariusz
^ permalink raw reply
* Re: [PATCH] ppc: chipsfb.c build fix for CONFIG_PM
From: Rafael J. Wysocki @ 2007-07-29 21:33 UTC (permalink / raw)
To: Mariusz Kozlowski
Cc: linuxppc-dev, Andrew Morton, paulus, pavel, linux-kernel
In-Reply-To: <200707291950.30261.m.kozlowski@tuxland.pl>
On Sunday, 29 July 2007 19:50, Mariusz Kozlowski wrote:
> Hello,
>
> This patch fixes the following build error on powerpc:
>
> CC drivers/video/chipsfb.o
> drivers/video/chipsfb.c: In function 'chipsfb_pci_suspend':
> drivers/video/chipsfb.c:461: error: 'PM_SUSPEND_MEM' undeclared (first use in this function)
> drivers/video/chipsfb.c:461: error: (Each undeclared identifier is reported only once
> drivers/video/chipsfb.c:461: error: for each function it appears in.)
> make[2]: *** [drivers/video/chipsfb.o] Blad 1
> make[1]: *** [drivers/video] Blad 2
> make: *** [drivers] Blad 2
Already fixed in the right way. Please see:
http://www.mail-archive.com/mm-commits@vger.kernel.org/msg22171.html
Greetings,
Rafael
--
"Premature optimization is the root of all evil." - Donald Knuth
^ permalink raw reply
* [PATCH] powerpc: clean out a bunch of duplicate includes
From: Jesper Juhl @ 2007-07-29 22:18 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Linux Kernel Mailing List
Cc: Cort Dougan, Jesper Juhl, Grant Erickson, Mike Corrigan,
Dave Engebretsen, Matt Porter, Paul Mackerras, Rohit Seth,
Dale Farnsworth, linuxppc-dev, Olof Johansson, Dan Malek,
Dan Malek, Peter Bergner, Paul Mackerras, Mike Corrigan,
Anton Blanchard, Gary Thomas, Andrew Morton
Hi,
Here's a patch to clean out a bunch of duplicate includes from
arch/powerpc/
Please consider for inclusion.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
---
arch/powerpc/kernel/btext.c | 1 -
arch/powerpc/kernel/crash.c | 1 -
arch/powerpc/kernel/iommu.c | 1 -
arch/powerpc/kernel/prom.c | 1 -
arch/powerpc/kernel/time.c | 1 -
arch/powerpc/mm/hash_utils_64.c | 1 -
arch/powerpc/mm/hugetlbpage.c | 3 ---
arch/powerpc/mm/init_32.c | 1 -
arch/powerpc/mm/mem.c | 1 -
arch/powerpc/platforms/52xx/mpc52xx_pic.c | 1 -
arch/powerpc/platforms/chrp/setup.c | 1 -
arch/powerpc/platforms/chrp/smp.c | 1 -
arch/powerpc/platforms/iseries/setup.c | 1 -
arch/powerpc/platforms/powermac/low_i2c.c | 1 -
arch/powerpc/platforms/powermac/udbg_adb.c | 1 -
arch/powerpc/platforms/pseries/lpar.c | 1 -
16 files changed, 0 insertions(+), 18 deletions(-)
diff --git a/arch/powerpc/kernel/btext.c b/arch/powerpc/kernel/btext.c
index e7b6846..3ef51fb 100644
--- a/arch/powerpc/kernel/btext.c
+++ b/arch/powerpc/kernel/btext.c
@@ -11,7 +11,6 @@
#include <asm/sections.h>
#include <asm/prom.h>
#include <asm/btext.h>
-#include <asm/prom.h>
#include <asm/page.h>
#include <asm/mmu.h>
#include <asm/pgtable.h>
diff --git a/arch/powerpc/kernel/crash.c b/arch/powerpc/kernel/crash.c
index 37658ea..77c749a 100644
--- a/arch/powerpc/kernel/crash.c
+++ b/arch/powerpc/kernel/crash.c
@@ -24,7 +24,6 @@
#include <linux/init.h>
#include <linux/irq.h>
#include <linux/types.h>
-#include <linux/irq.h>
#include <asm/processor.h>
#include <asm/machdep.h>
diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c
index c08ceca..e4ec6ee 100644
--- a/arch/powerpc/kernel/iommu.c
+++ b/arch/powerpc/kernel/iommu.c
@@ -30,7 +30,6 @@
#include <linux/spinlock.h>
#include <linux/string.h>
#include <linux/dma-mapping.h>
-#include <linux/init.h>
#include <linux/bitops.h>
#include <asm/io.h>
#include <asm/prom.h>
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index a38197b..0028fe6 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -52,7 +52,6 @@
#include <asm/pSeries_reconfig.h>
#include <asm/pci-bridge.h>
#include <asm/kexec.h>
-#include <asm/system.h>
#ifdef DEBUG
#define DBG(fmt...) printk(KERN_ERR fmt)
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index 727a669..c85d9b0 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -72,7 +72,6 @@
#include <asm/iseries/it_lp_queue.h>
#include <asm/iseries/hv_call_xm.h>
#endif
-#include <asm/smp.h>
/* keep track of when we need to update the rtc */
time_t last_rtc_update;
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
index bc7b0ce..c2bf404 100644
--- a/arch/powerpc/mm/hash_utils_64.c
+++ b/arch/powerpc/mm/hash_utils_64.c
@@ -49,7 +49,6 @@
#include <asm/tlb.h>
#include <asm/cacheflush.h>
#include <asm/cputable.h>
-#include <asm/abs_addr.h>
#include <asm/sections.h>
#include <asm/spu.h>
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c
index 4835f73..ba5f12a 100644
--- a/arch/powerpc/mm/hugetlbpage.c
+++ b/arch/powerpc/mm/hugetlbpage.c
@@ -22,11 +22,8 @@
#include <asm/mmu_context.h>
#include <asm/machdep.h>
#include <asm/cputable.h>
-#include <asm/tlb.h>
#include <asm/spu.h>
-#include <linux/sysctl.h>
-
#define NUM_LOW_AREAS (0x100000000UL >> SID_SHIFT)
#define NUM_HIGH_AREAS (PGTABLE_RANGE >> HTLB_AREA_SHIFT)
diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c
index e1f5ded..d65995a 100644
--- a/arch/powerpc/mm/init_32.c
+++ b/arch/powerpc/mm/init_32.c
@@ -41,7 +41,6 @@
#include <asm/machdep.h>
#include <asm/btext.h>
#include <asm/tlb.h>
-#include <asm/prom.h>
#include <asm/lmb.h>
#include <asm/sections.h>
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
index f0e7eed..32dcfc9 100644
--- a/arch/powerpc/mm/mem.c
+++ b/arch/powerpc/mm/mem.c
@@ -42,7 +42,6 @@
#include <asm/machdep.h>
#include <asm/btext.h>
#include <asm/tlb.h>
-#include <asm/prom.h>
#include <asm/lmb.h>
#include <asm/sections.h>
#include <asm/vdso.h>
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pic.c b/arch/powerpc/platforms/52xx/mpc52xx_pic.c
index fbfff95..8c464c5 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_pic.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_pic.c
@@ -22,7 +22,6 @@
#include <linux/init.h>
#include <linux/sched.h>
#include <linux/signal.h>
-#include <linux/stddef.h>
#include <linux/delay.h>
#include <linux/irq.h>
#include <linux/hardirq.h>
diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c
index 373de4c..dde5ef4 100644
--- a/arch/powerpc/platforms/chrp/setup.c
+++ b/arch/powerpc/platforms/chrp/setup.c
@@ -32,7 +32,6 @@
#include <linux/seq_file.h>
#include <linux/root_dev.h>
#include <linux/initrd.h>
-#include <linux/module.h>
#include <linux/timer.h>
#include <asm/io.h>
diff --git a/arch/powerpc/platforms/chrp/smp.c b/arch/powerpc/platforms/chrp/smp.c
index 3ea0eb7..a137d13 100644
--- a/arch/powerpc/platforms/chrp/smp.c
+++ b/arch/powerpc/platforms/chrp/smp.c
@@ -29,7 +29,6 @@
#include <asm/residual.h>
#include <asm/time.h>
#include <asm/machdep.h>
-#include <asm/smp.h>
#include <asm/mpic.h>
#include <asm/rtas.h>
diff --git a/arch/powerpc/platforms/iseries/setup.c b/arch/powerpc/platforms/iseries/setup.c
index 13a8b19..fad493e 100644
--- a/arch/powerpc/platforms/iseries/setup.c
+++ b/arch/powerpc/platforms/iseries/setup.c
@@ -41,7 +41,6 @@
#include <asm/time.h>
#include <asm/paca.h>
#include <asm/cache.h>
-#include <asm/sections.h>
#include <asm/abs_addr.h>
#include <asm/iseries/hv_lp_config.h>
#include <asm/iseries/hv_call_event.h>
diff --git a/arch/powerpc/platforms/powermac/low_i2c.c b/arch/powerpc/platforms/powermac/low_i2c.c
index efdf5eb..da2007e 100644
--- a/arch/powerpc/platforms/powermac/low_i2c.c
+++ b/arch/powerpc/platforms/powermac/low_i2c.c
@@ -40,7 +40,6 @@
#include <linux/completion.h>
#include <linux/platform_device.h>
#include <linux/interrupt.h>
-#include <linux/completion.h>
#include <linux/timer.h>
#include <linux/mutex.h>
#include <asm/keylargo.h>
diff --git a/arch/powerpc/platforms/powermac/udbg_adb.c b/arch/powerpc/platforms/powermac/udbg_adb.c
index 6124e59..b1882e4 100644
--- a/arch/powerpc/platforms/powermac/udbg_adb.c
+++ b/arch/powerpc/platforms/powermac/udbg_adb.c
@@ -12,7 +12,6 @@
#include <asm/xmon.h>
#include <asm/prom.h>
#include <asm/bootx.h>
-#include <asm/machdep.h>
#include <asm/errno.h>
#include <asm/pmac_feature.h>
#include <asm/processor.h>
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c
index 8cc6eee..ea327ca 100644
--- a/arch/powerpc/platforms/pseries/lpar.c
+++ b/arch/powerpc/platforms/pseries/lpar.c
@@ -35,7 +35,6 @@
#include <asm/tlbflush.h>
#include <asm/tlb.h>
#include <asm/prom.h>
-#include <asm/abs_addr.h>
#include <asm/cputable.h>
#include <asm/udbg.h>
#include <asm/smp.h>
^ permalink raw reply related
* Re: [PATCH] powerpc: clean out a bunch of duplicate includes
From: Benjamin Herrenschmidt @ 2007-07-29 22:58 UTC (permalink / raw)
To: Jesper Juhl
Cc: Cort Dougan, Grant Erickson, Mike Corrigan, Dave Engebretsen,
Matt Porter, Paul Mackerras, Rohit Seth,
Linux Kernel Mailing List, Dale Farnsworth, linuxppc-dev,
Olof Johansson, Dan Malek, Dan Malek, Peter Bergner,
Paul Mackerras, Mike Corrigan, Anton Blanchard, Gary Thomas,
Andrew Morton
In-Reply-To: <200707300018.26324.jesper.juhl@gmail.com>
On Mon, 2007-07-30 at 00:18 +0200, Jesper Juhl wrote:
> Hi,
>
> Here's a patch to clean out a bunch of duplicate includes from
> arch/powerpc/
>
> Please consider for inclusion.
Ah.. historical stuff stacking up :-)
>
> Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
>
> arch/powerpc/kernel/btext.c | 1 -
> arch/powerpc/kernel/crash.c | 1 -
> arch/powerpc/kernel/iommu.c | 1 -
> arch/powerpc/kernel/prom.c | 1 -
> arch/powerpc/kernel/time.c | 1 -
> arch/powerpc/mm/hash_utils_64.c | 1 -
> arch/powerpc/mm/hugetlbpage.c | 3 ---
> arch/powerpc/mm/init_32.c | 1 -
> arch/powerpc/mm/mem.c | 1 -
> arch/powerpc/platforms/52xx/mpc52xx_pic.c | 1 -
> arch/powerpc/platforms/chrp/setup.c | 1 -
> arch/powerpc/platforms/chrp/smp.c | 1 -
> arch/powerpc/platforms/iseries/setup.c | 1 -
> arch/powerpc/platforms/powermac/low_i2c.c | 1 -
> arch/powerpc/platforms/powermac/udbg_adb.c | 1 -
> arch/powerpc/platforms/pseries/lpar.c | 1 -
> 16 files changed, 0 insertions(+), 18 deletions(-)
>
> diff --git a/arch/powerpc/kernel/btext.c b/arch/powerpc/kernel/btext.c
> index e7b6846..3ef51fb 100644
> --- a/arch/powerpc/kernel/btext.c
> +++ b/arch/powerpc/kernel/btext.c
> @@ -11,7 +11,6 @@
> #include <asm/sections.h>
> #include <asm/prom.h>
> #include <asm/btext.h>
> -#include <asm/prom.h>
> #include <asm/page.h>
> #include <asm/mmu.h>
> #include <asm/pgtable.h>
> diff --git a/arch/powerpc/kernel/crash.c b/arch/powerpc/kernel/crash.c
> index 37658ea..77c749a 100644
> --- a/arch/powerpc/kernel/crash.c
> +++ b/arch/powerpc/kernel/crash.c
> @@ -24,7 +24,6 @@
> #include <linux/init.h>
> #include <linux/irq.h>
> #include <linux/types.h>
> -#include <linux/irq.h>
>
> #include <asm/processor.h>
> #include <asm/machdep.h>
> diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c
> index c08ceca..e4ec6ee 100644
> --- a/arch/powerpc/kernel/iommu.c
> +++ b/arch/powerpc/kernel/iommu.c
> @@ -30,7 +30,6 @@
> #include <linux/spinlock.h>
> #include <linux/string.h>
> #include <linux/dma-mapping.h>
> -#include <linux/init.h>
> #include <linux/bitops.h>
> #include <asm/io.h>
> #include <asm/prom.h>
> diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
> index a38197b..0028fe6 100644
> --- a/arch/powerpc/kernel/prom.c
> +++ b/arch/powerpc/kernel/prom.c
> @@ -52,7 +52,6 @@
> #include <asm/pSeries_reconfig.h>
> #include <asm/pci-bridge.h>
> #include <asm/kexec.h>
> -#include <asm/system.h>
>
> #ifdef DEBUG
> #define DBG(fmt...) printk(KERN_ERR fmt)
> diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
> index 727a669..c85d9b0 100644
> --- a/arch/powerpc/kernel/time.c
> +++ b/arch/powerpc/kernel/time.c
> @@ -72,7 +72,6 @@
> #include <asm/iseries/it_lp_queue.h>
> #include <asm/iseries/hv_call_xm.h>
> #endif
> -#include <asm/smp.h>
>
> /* keep track of when we need to update the rtc */
> time_t last_rtc_update;
> diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
> index bc7b0ce..c2bf404 100644
> --- a/arch/powerpc/mm/hash_utils_64.c
> +++ b/arch/powerpc/mm/hash_utils_64.c
> @@ -49,7 +49,6 @@
> #include <asm/tlb.h>
> #include <asm/cacheflush.h>
> #include <asm/cputable.h>
> -#include <asm/abs_addr.h>
> #include <asm/sections.h>
> #include <asm/spu.h>
>
> diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c
> index 4835f73..ba5f12a 100644
> --- a/arch/powerpc/mm/hugetlbpage.c
> +++ b/arch/powerpc/mm/hugetlbpage.c
> @@ -22,11 +22,8 @@
> #include <asm/mmu_context.h>
> #include <asm/machdep.h>
> #include <asm/cputable.h>
> -#include <asm/tlb.h>
> #include <asm/spu.h>
>
> -#include <linux/sysctl.h>
> -
> #define NUM_LOW_AREAS (0x100000000UL >> SID_SHIFT)
> #define NUM_HIGH_AREAS (PGTABLE_RANGE >> HTLB_AREA_SHIFT)
>
> diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c
> index e1f5ded..d65995a 100644
> --- a/arch/powerpc/mm/init_32.c
> +++ b/arch/powerpc/mm/init_32.c
> @@ -41,7 +41,6 @@
> #include <asm/machdep.h>
> #include <asm/btext.h>
> #include <asm/tlb.h>
> -#include <asm/prom.h>
> #include <asm/lmb.h>
> #include <asm/sections.h>
>
> diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
> index f0e7eed..32dcfc9 100644
> --- a/arch/powerpc/mm/mem.c
> +++ b/arch/powerpc/mm/mem.c
> @@ -42,7 +42,6 @@
> #include <asm/machdep.h>
> #include <asm/btext.h>
> #include <asm/tlb.h>
> -#include <asm/prom.h>
> #include <asm/lmb.h>
> #include <asm/sections.h>
> #include <asm/vdso.h>
> diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pic.c b/arch/powerpc/platforms/52xx/mpc52xx_pic.c
> index fbfff95..8c464c5 100644
> --- a/arch/powerpc/platforms/52xx/mpc52xx_pic.c
> +++ b/arch/powerpc/platforms/52xx/mpc52xx_pic.c
> @@ -22,7 +22,6 @@
> #include <linux/init.h>
> #include <linux/sched.h>
> #include <linux/signal.h>
> -#include <linux/stddef.h>
> #include <linux/delay.h>
> #include <linux/irq.h>
> #include <linux/hardirq.h>
> diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c
> index 373de4c..dde5ef4 100644
> --- a/arch/powerpc/platforms/chrp/setup.c
> +++ b/arch/powerpc/platforms/chrp/setup.c
> @@ -32,7 +32,6 @@
> #include <linux/seq_file.h>
> #include <linux/root_dev.h>
> #include <linux/initrd.h>
> -#include <linux/module.h>
> #include <linux/timer.h>
>
> #include <asm/io.h>
> diff --git a/arch/powerpc/platforms/chrp/smp.c b/arch/powerpc/platforms/chrp/smp.c
> index 3ea0eb7..a137d13 100644
> --- a/arch/powerpc/platforms/chrp/smp.c
> +++ b/arch/powerpc/platforms/chrp/smp.c
> @@ -29,7 +29,6 @@
> #include <asm/residual.h>
> #include <asm/time.h>
> #include <asm/machdep.h>
> -#include <asm/smp.h>
> #include <asm/mpic.h>
> #include <asm/rtas.h>
>
> diff --git a/arch/powerpc/platforms/iseries/setup.c b/arch/powerpc/platforms/iseries/setup.c
> index 13a8b19..fad493e 100644
> --- a/arch/powerpc/platforms/iseries/setup.c
> +++ b/arch/powerpc/platforms/iseries/setup.c
> @@ -41,7 +41,6 @@
> #include <asm/time.h>
> #include <asm/paca.h>
> #include <asm/cache.h>
> -#include <asm/sections.h>
> #include <asm/abs_addr.h>
> #include <asm/iseries/hv_lp_config.h>
> #include <asm/iseries/hv_call_event.h>
> diff --git a/arch/powerpc/platforms/powermac/low_i2c.c b/arch/powerpc/platforms/powermac/low_i2c.c
> index efdf5eb..da2007e 100644
> --- a/arch/powerpc/platforms/powermac/low_i2c.c
> +++ b/arch/powerpc/platforms/powermac/low_i2c.c
> @@ -40,7 +40,6 @@
> #include <linux/completion.h>
> #include <linux/platform_device.h>
> #include <linux/interrupt.h>
> -#include <linux/completion.h>
> #include <linux/timer.h>
> #include <linux/mutex.h>
> #include <asm/keylargo.h>
> diff --git a/arch/powerpc/platforms/powermac/udbg_adb.c b/arch/powerpc/platforms/powermac/udbg_adb.c
> index 6124e59..b1882e4 100644
> --- a/arch/powerpc/platforms/powermac/udbg_adb.c
> +++ b/arch/powerpc/platforms/powermac/udbg_adb.c
> @@ -12,7 +12,6 @@
> #include <asm/xmon.h>
> #include <asm/prom.h>
> #include <asm/bootx.h>
> -#include <asm/machdep.h>
> #include <asm/errno.h>
> #include <asm/pmac_feature.h>
> #include <asm/processor.h>
> diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c
> index 8cc6eee..ea327ca 100644
> --- a/arch/powerpc/platforms/pseries/lpar.c
> +++ b/arch/powerpc/platforms/pseries/lpar.c
> @@ -35,7 +35,6 @@
> #include <asm/tlbflush.h>
> #include <asm/tlb.h>
> #include <asm/prom.h>
> -#include <asm/abs_addr.h>
> #include <asm/cputable.h>
> #include <asm/udbg.h>
> #include <asm/smp.h>
>
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply
* Re: Using video memory on PS3 e.g. as SWAP?
From: Benjamin Herrenschmidt @ 2007-07-29 23:34 UTC (permalink / raw)
To: René Rebe; +Cc: linuxppc-dev
In-Reply-To: <200707291904.55700.rene@exactcode.de>
On Sun, 2007-07-29 at 19:04 +0200, René Rebe wrote:
> Hi all,
>
> looking at the PS3 as one of the few PowerPC workstation options the RAM
> is obviously quite limitted with just 256MB. I wonder if the 256MB of
> video memory can be mapped or at least be used as super-fast SWAP?
>
> Or are there news regarding accessing the video chip from Linux beside
> the unaccelerated frame-buffer?
I can be mapped, and accessed directly with MMIO. Some folks did a
driver for that, not sure where about. It's fairly slow though. The
problem is that MMIO accesses to VRAM aren't fast. DMAs are supposed to
be but then, we don't have access to those.
Cheers,
Ben
^ permalink raw reply
* Re: ml403 ac97 driver
From: Qin Lin @ 2007-07-30 5:40 UTC (permalink / raw)
To: linuxppc-embedded
In-Reply-To: <1185698888.6397.37.camel@localhost>
Hi Joachim
I re-coross-compile alsa-lib and alsa-utils and install them in /usr on
board ,but the result is really no different .Would you mind if you point
out what i forget to do ?=20
# insmod ac97_bus.ko
# insmod snd-ac97-codec.ko
# insmod ml403_ac97cr.ko
[ 79.529114] ml403_ac97cr: remap controller memory region to 0xc500e000
done
[ 79.611803] ml403_ac97cr: request (playback) irq 7 done
[ 79.674236] ml403_ac97cr: request (capture) irq 6 done
[ 79.784291] snd-ml403_ac97cr: write access to codec register 0x26 with
bad value 0x800f / 32783!
[ 79.900247] snd-ml403_ac97cr: write access to codec register 0x26 with
bad value 0xf / 15!
[ 80.004284] snd-ml403_ac97cr: write access to codec register 0x2a with
bad value 0x2801 / 10241!
[ 80.116228] snd-ml403_ac97cr: write access to codec register 0x2a with
bad value 0x3801 / 14337!
# ./snddevices .........//use alsa-driver-1.0.14=20
creating device nod script
Creating mixer?...done.
Creating sequencer...done.
Creating midi0?...done.
Creating dsp?...done.
Creating audio?...done.
Creating sndstat...done.
Creating music...done.
Creating dmmidi?...done.
Creating dmfm?...done.
Creating amixer?...done.
Creating adsp?...done.
Creating amidi?...done.
Creating admmidi?...done.
rm: /dev/snd: is a directory
Creating snd/control?...done.
Creating snd/seq...done.
Creating snd/timer...done.
Creating snd/hw??...done.
Creating snd/midi??...done.
Creating snd/pcm??p...done.
Creating snd/pcm??c...done.
Creating aload?...done.
Creating aloadSEQ...done.
# ls -l /dev/snd
crw-rw-rw- 1 root root 116, 0 Jan 1 00:01 controlC0
crw-rw-rw- 1 root root 116, 4 Jan 1 00:01 hwC0D0
crw-rw-rw- 1 root root 116, 5 Jan 1 00:01 hwC0D1
crw-rw-rw- 1 root root 116, 6 Jan 1 00:01 hwC0D2
crw-rw-rw- 1 root root 116, 7 Jan 1 00:01 hwC0D3
crw-rw-rw- 1 root root 116, 24 Jan 1 00:01 pcmC0D0c
crw-rw-rw- 1 root root 116, 16 Jan 1 00:01 pcmC0D0p
crw-rw-rw- 1 root root 116, 1 Jan 1 00:01 seq
crw-rw-rw- 1 root root 116, 33 Jan 1 00:01 timer
# cat /proc/devices
Character devices:
1 mem
4 /dev/vc/0
4 tty
4 ttyS
5 /dev/tty
5 /dev/console
5 /dev/ptmx
7 vcs
10 misc
13 input
14 sound
29 fb
116 alsa
128 ptm
136 pts
254 keyboard
# cat /proc/asound/devices
0: [ 0] : control
16: [ 0- 0]: digital audio playback
24: [ 0- 0]: digital audio capture
33: : timer
# aplay -D /dev/snd/pcmC0D0p
ALSA lib pcm.c:2144:(snd_pcm_open_noupdate) Unknown PCM /dev/snd/pcmC0D0p
# ./test_sound.out /dev/snd/pcmC0D0p=20
ALSA lib pcm.c:2090:(snd_pcm_open_noupdate) Unknown PCM /dev/snd/pcmC0D0p
cannot open audio device /dev/snd/pcmC0D0p (No such file or directory)
.............test_sound.out is A Minimal Playback Program from =20
http://equalarea.com/paul/alsa-audio.html
thanks for your help!
Qin Lin
Joachim F=C3=B6rster wrote:
>=20
> Hi qin lin,
>=20
> On Sat, 2007-07-28 at 17:04 +0800, qin lin wrote:
>> I have add the driver to kernel as a module in ml403.When i insmod=20
>> the module ,there are warnings followed here:
>> [ 250.795594] snd-ml403_ac97cr: write access to codec register 0x26
>> with bad value 0x800f / 32783!=20
>> [ 250.911545] snd-ml403_ac97cr: write access to codec register 0x26
>> with bad value 0xf / 15!
>> [ 251.015576] snd-ml403_ac97cr: write access to codec register 0x2a
>> with bad value 0x2801 / 10241!
>> [ 251.127524] snd-ml403_ac97cr: write access to codec register 0x2a
>> with bad value 0x3801 / 14337!=20
>>=20
>> And i check the warring find the warnings should be from function
>> snd_ml403_ac97cr_codec_write() =EF=BC=8Ci have check the lm4550 codec
>> datasheet to make sure the mask is what you have written.
>=20
> These warnings are ok. Codec register 0x26 is the "PowerDown
> Status/Control" register and the ALSA AC97 layer tries to write ones to
> the lower 4 bits (which are AFAIK read only bits). LM4550 register 0x2a
> has only one valid bit (lowest), but ALSA tries to write to a not
> existing bit. So my driver masks out these bits.
> The warnings show the invalid numbers ALSA wants to write to these
> registers.
>=20
>> What confused me is that where call the fuction
>> snd_ml403_ac97cr_codec_write in the module_init program, would you
>> mind if you point it for me?=20
>=20
> Well, the function alsa_card_ml403_ac97cr_init() is registered as the
> module_init function. It registers the driver and the device to the
> kernel via platform_driver/device_register(). As a consequence the
> kernel will call the registered probe() function called
> snd_ml403_ac97cr_probe(). Among other things, the function called
> snd_ml403_ac97cr_mixer() is invoked. Finally this function registers a
> mixer device and the codec_read() and codec_write() functions with the
> ALSA AC97 layer. While registering the ALSA AC97 layer calls the read
> and write functions several times - a kind of initialization sequence.
> That's the usual structure of an ALSA driver - not that simple - I
> know :-) .
>=20
>> There is another problem trouble me .I find a simple test program to
>> check the codec playback work .But all it said that it cannot find
>> the pcm file.Would you mind if you suggest something or paste what you
>> have do to mknod the device?=20
>=20
> Oh, I forgot to mention that in the README file. I used the "snddevices"
> script found in ALSA's alsa-driver package (form version 1.0.13, but
> version shouldn't matter).
>=20
>> # ./test_sound.out /dev/snd/pcmC0D0
>> ALSA lib pcm.c:2090:(snd_pcm_open_noupdate) Unknown
>> PCM /dev/snd/pcmC0D0=20
>> cannot open audio device /dev/snd/pcmC0D0 (No such file or directory)
>=20
> Hmmm, try to create the device files with the script from above and see
> if that happens again ...
> BTW: (After having created the device files) you can also use aplay
> (alsa-utils package) for testing. Where did you find "test_sound"?
>=20
> Joachim
>=20
>=20
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>=20
--=20
View this message in context: http://www.nabble.com/Re%3A-ml403-ac97-driver=
-tf4164866.html#a11858308
Sent from the linuxppc-embedded mailing list archive at Nabble.com.
^ permalink raw reply
* Fixes to allow use of Ebony's flash chips through physmap_of
From: David Gibson @ 2007-07-30 5:55 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
This patch contains a handful of small fixes to allow the Ebony's
flash to be exposed as MTD devices via the physmap_of driver.
Specifically it:
- Makes a small addition to the device tree and zImage wrapper
to record the correct address for the flash in the device tree based
on the board switches as reported via an FPGA register.
- Prohibits building the old hard-coded "Ebony" flash map on
arch/powerpc kernels, in favour of using physmap_of's device tree
based approach.
- Enables MTD and physmap_of in the Ebony defconfig.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
Paul, this should be mergeable for 2.6.24.
Index: working-2.6/drivers/mtd/maps/Kconfig
===================================================================
--- working-2.6.orig/drivers/mtd/maps/Kconfig 2007-07-30 15:47:54.000000000 +1000
+++ working-2.6/drivers/mtd/maps/Kconfig 2007-07-30 15:47:56.000000000 +1000
@@ -362,7 +362,7 @@ config MTD_WALNUT
config MTD_EBONY
tristate "Flash devices mapped on IBM 440GP Ebony"
- depends on MTD_JEDECPROBE && EBONY
+ depends on MTD_JEDECPROBE && EBONY && !PPC_MERGE
help
This enables access routines for the flash chips on the IBM 440GP
Ebony board. If you have one of these boards and would like to
Index: working-2.6/arch/powerpc/boot/ebony.c
===================================================================
--- working-2.6.orig/arch/powerpc/boot/ebony.c 2007-07-30 15:47:54.000000000 +1000
+++ working-2.6/arch/powerpc/boot/ebony.c 2007-07-30 15:47:56.000000000 +1000
@@ -24,6 +24,7 @@
#include "page.h"
#include "ops.h"
#include "reg.h"
+#include "io.h"
#include "dcr.h"
#include "44x.h"
@@ -92,6 +93,43 @@ void ibm440gp_fixup_clocks(unsigned int
dt_fixup_clock("/plb/opb/serial@40000300", uart1);
}
+#define EBONY_FPGA_PATH "/plb/opb/ebc/fpga"
+#define EBONY_FPGA_FLASH_SEL 0x01
+#define EBONY_SMALL_FLASH_PATH "/plb/opb/ebc/small-flash"
+
+static void ebony_flashsel_fixup(void)
+{
+ void *devp;
+ u32 reg[3] = {0x0, 0x0, 0x80000};
+ u8 *fpga;
+ u8 fpga_reg0 = 0x0;
+
+ devp = finddevice(EBONY_FPGA_PATH);
+ if (!devp)
+ fatal("Couldn't locate FPGA node %s\n\r", EBONY_FPGA_PATH);
+
+ if (getprop(devp, "virtual-reg", &fpga, sizeof(fpga)) != sizeof(fpga))
+ fatal("%s has missing or invalid virtual-reg property\n\r",
+ EBONY_FPGA_PATH);
+
+ fpga_reg0 = in_8(fpga);
+
+ devp = finddevice(EBONY_SMALL_FLASH_PATH);
+ if (!devp)
+ fatal("Couldn't locate small flash node %s\n\r",
+ EBONY_SMALL_FLASH_PATH);
+
+ if (getprop(devp, "reg", reg, sizeof(reg)) != sizeof(reg))
+ fatal("%s has reg property of unexpected size\n\r",
+ EBONY_SMALL_FLASH_PATH);
+
+ /* Invert address bit 14 (IBM-endian) if FLASH_SEL fpga bit is set */
+ if (fpga_reg0 & EBONY_FPGA_FLASH_SEL)
+ reg[1] ^= 0x80000;
+
+ setprop(devp, "reg", reg, sizeof(reg));
+}
+
static void ebony_fixups(void)
{
// FIXME: sysclk should be derived by reading the FPGA registers
@@ -101,6 +139,7 @@ static void ebony_fixups(void)
ibm44x_fixup_memsize();
dt_fixup_mac_addresses(ebony_mac0, ebony_mac1);
ibm4xx_fixup_ebc_ranges("/plb/opb/ebc");
+ ebony_flashsel_fixup();
}
void ebony_init(void *mac0, void *mac1)
Index: working-2.6/arch/powerpc/boot/dts/ebony.dts
===================================================================
--- working-2.6.orig/arch/powerpc/boot/dts/ebony.dts 2007-07-30 15:47:54.000000000 +1000
+++ working-2.6/arch/powerpc/boot/dts/ebony.dts 2007-07-30 15:47:56.000000000 +1000
@@ -175,6 +175,7 @@
fpga@7,0 {
compatible = "Ebony-FPGA";
reg = <7 0 10>;
+ virtual-reg = <e8300000>;
};
};
Index: working-2.6/arch/powerpc/configs/ebony_defconfig
===================================================================
--- working-2.6.orig/arch/powerpc/configs/ebony_defconfig 2007-07-30 15:47:54.000000000 +1000
+++ working-2.6/arch/powerpc/configs/ebony_defconfig 2007-07-30 15:48:02.000000000 +1000
@@ -1,9 +1,25 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.22-rc6
-# Tue Jun 26 12:38:33 2007
+# Linux kernel version: 2.6.23-rc1-powerpc-ebony-mtd
+# Mon Jul 30 15:47:59 2007
#
# CONFIG_PPC64 is not set
+
+#
+# Processor support
+#
+# CONFIG_6xx is not set
+# CONFIG_PPC_85xx is not set
+# CONFIG_PPC_8xx is not set
+# CONFIG_40x is not set
+CONFIG_44x=y
+# CONFIG_E200 is not set
+CONFIG_4xx=y
+CONFIG_BOOKE=y
+CONFIG_PTE_64BIT=y
+CONFIG_PHYS_64BIT=y
+# CONFIG_PPC_MM_SLICES is not set
+CONFIG_NOT_COHERENT_CACHE=y
CONFIG_PPC32=y
CONFIG_PPC_MERGE=y
CONFIG_MMU=y
@@ -14,39 +30,22 @@ CONFIG_ARCH_HAS_ILOG2_U32=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_GENERIC_FIND_NEXT_BIT=y
+# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
CONFIG_PPC=y
CONFIG_EARLY_PRINTK=y
CONFIG_GENERIC_NVRAM=y
CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
CONFIG_PPC_OF=y
+CONFIG_OF=y
# CONFIG_PPC_UDBG_16550 is not set
# CONFIG_GENERIC_TBSYNC is not set
CONFIG_AUDIT_ARCH=y
CONFIG_GENERIC_BUG=y
# CONFIG_DEFAULT_UIMAGE is not set
-
-#
-# Processor support
-#
-# CONFIG_CLASSIC32 is not set
-# CONFIG_PPC_82xx is not set
-# CONFIG_PPC_83xx is not set
-# CONFIG_PPC_85xx is not set
-# CONFIG_PPC_86xx is not set
-# CONFIG_PPC_8xx is not set
-# CONFIG_40x is not set
-CONFIG_44x=y
-# CONFIG_E200 is not set
CONFIG_PPC_DCR_NATIVE=y
# CONFIG_PPC_DCR_MMIO is not set
CONFIG_PPC_DCR=y
-CONFIG_4xx=y
-CONFIG_BOOKE=y
-CONFIG_PTE_64BIT=y
-CONFIG_PHYS_64BIT=y
-# CONFIG_PPC_MM_SLICES is not set
-CONFIG_NOT_COHERENT_CACHE=y
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
#
@@ -63,12 +62,11 @@ CONFIG_LOCALVERSION=""
CONFIG_LOCALVERSION_AUTO=y
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
-# CONFIG_IPC_NS is not set
CONFIG_SYSVIPC_SYSCTL=y
CONFIG_POSIX_MQUEUE=y
# CONFIG_BSD_PROCESS_ACCT is not set
# CONFIG_TASKSTATS is not set
-# CONFIG_UTS_NS is not set
+# CONFIG_USER_NS is not set
# CONFIG_AUDIT is not set
# CONFIG_IKCONFIG is not set
CONFIG_LOG_BUF_SHIFT=14
@@ -102,24 +100,17 @@ CONFIG_SLAB=y
CONFIG_RT_MUTEXES=y
# CONFIG_TINY_SHMEM is not set
CONFIG_BASE_SMALL=0
-
-#
-# Loadable module support
-#
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
# CONFIG_MODULE_FORCE_UNLOAD is not set
# CONFIG_MODVERSIONS is not set
# CONFIG_MODULE_SRCVERSION_ALL is not set
CONFIG_KMOD=y
-
-#
-# Block layer
-#
CONFIG_BLOCK=y
CONFIG_LBD=y
# CONFIG_BLK_DEV_IO_TRACE is not set
# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
#
# IO Schedulers
@@ -184,6 +175,8 @@ CONFIG_FLAT_NODE_MEM_MAP=y
CONFIG_SPLIT_PTLOCK_CPUS=4
CONFIG_RESOURCES_64BIT=y
CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
CONFIG_PROC_DEVICETREE=y
# CONFIG_CMDLINE_BOOL is not set
CONFIG_SECCOMP=y
@@ -196,9 +189,9 @@ CONFIG_ISA_DMA_API=y
#
CONFIG_ZONE_DMA=y
CONFIG_PPC_INDIRECT_PCI=y
-# CONFIG_PPC_INDIRECT_PCI_BE is not set
CONFIG_PCI=y
CONFIG_PCI_DOMAINS=y
+CONFIG_PCI_SYSCALL=y
# CONFIG_PCIEPORTBUS is not set
CONFIG_ARCH_SUPPORTS_MSI=y
# CONFIG_PCI_MSI is not set
@@ -306,6 +299,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
# CONFIG_MAC80211 is not set
# CONFIG_IEEE80211 is not set
# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
#
# Device Drivers
@@ -320,27 +314,85 @@ CONFIG_FW_LOADER=y
# CONFIG_DEBUG_DRIVER is not set
# CONFIG_DEBUG_DEVRES is not set
# CONFIG_SYS_HYPERVISOR is not set
-
-#
-# Connector - unified userspace <-> kernelspace linker
-#
CONFIG_CONNECTOR=y
CONFIG_PROC_EVENTS=y
-# CONFIG_MTD is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+# CONFIG_MTD_CMDLINE_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+CONFIG_MTD_JEDECPROBE=y
+CONFIG_MTD_GEN_PROBE=y
+# CONFIG_MTD_CFI_ADV_OPTIONS is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_CFI_INTELEXT is not set
+CONFIG_MTD_CFI_AMDSTD=y
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PHYSMAP is not set
+CONFIG_MTD_PHYSMAP_OF=y
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_PMC551 is not set
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+# CONFIG_MTD_NAND is not set
+# CONFIG_MTD_ONENAND is not set
#
-# Parallel port support
+# UBI - Unsorted block images
#
+# CONFIG_MTD_UBI is not set
+CONFIG_OF_DEVICE=y
# CONFIG_PARPORT is not set
-
-#
-# Plug and Play support
-#
-# CONFIG_PNPACPI is not set
-
-#
-# Block devices
-#
+CONFIG_BLK_DEV=y
# CONFIG_BLK_DEV_FD is not set
# CONFIG_BLK_CPQ_DA is not set
# CONFIG_BLK_CPQ_CISS_DA is not set
@@ -356,14 +408,12 @@ CONFIG_BLK_DEV_RAM_SIZE=35000
CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
# CONFIG_CDROM_PKTCDVD is not set
# CONFIG_ATA_OVER_ETH is not set
-
-#
-# Misc devices
-#
+# CONFIG_XILINX_SYSACE is not set
+CONFIG_MISC_DEVICES=y
# CONFIG_PHANTOM is not set
+# CONFIG_EEPROM_93CX6 is not set
# CONFIG_SGI_IOC4 is not set
# CONFIG_TIFM_CORE is not set
-# CONFIG_BLINK is not set
# CONFIG_IDE is not set
#
@@ -371,12 +421,9 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
#
# CONFIG_RAID_ATTRS is not set
# CONFIG_SCSI is not set
+# CONFIG_SCSI_DMA is not set
# CONFIG_SCSI_NETLINK is not set
# CONFIG_ATA is not set
-
-#
-# Multi-device support (RAID and LVM)
-#
# CONFIG_MD is not set
#
@@ -389,35 +436,17 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
#
# CONFIG_FIREWIRE is not set
# CONFIG_IEEE1394 is not set
-
-#
-# I2O device support
-#
# CONFIG_I2O is not set
# CONFIG_MACINTOSH_DRIVERS is not set
-
-#
-# Network device support
-#
CONFIG_NETDEVICES=y
+# CONFIG_NETDEVICES_MULTIQUEUE is not set
# CONFIG_DUMMY is not set
# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
# CONFIG_EQUALIZER is not set
# CONFIG_TUN is not set
# CONFIG_ARCNET is not set
-
-#
-# Ethernet (10 or 100Mbit)
-#
# CONFIG_NET_ETHERNET is not set
-CONFIG_IBM_EMAC=y
-CONFIG_IBM_EMAC_RXB=128
-CONFIG_IBM_EMAC_TXB=64
-CONFIG_IBM_EMAC_POLL_WEIGHT=32
-CONFIG_IBM_EMAC_RX_COPY_THRESHOLD=256
-CONFIG_IBM_EMAC_RX_SKB_HEADROOM=0
-# CONFIG_IBM_EMAC_DEBUG is not set
-CONFIG_IBM_EMAC_ZMII=y
CONFIG_NETDEV_1000=y
# CONFIG_ACENIC is not set
# CONFIG_DL2K is not set
@@ -429,7 +458,6 @@ CONFIG_NETDEV_1000=y
# CONFIG_SIS190 is not set
# CONFIG_SKGE is not set
# CONFIG_SKY2 is not set
-# CONFIG_SK98LIN is not set
# CONFIG_VIA_VELOCITY is not set
# CONFIG_TIGON3 is not set
# CONFIG_BNX2 is not set
@@ -459,15 +487,7 @@ CONFIG_NETDEV_10000=y
# CONFIG_NETCONSOLE is not set
# CONFIG_NETPOLL is not set
# CONFIG_NET_POLL_CONTROLLER is not set
-
-#
-# ISDN subsystem
-#
# CONFIG_ISDN is not set
-
-#
-# Telephony Support
-#
# CONFIG_PHONE is not set
#
@@ -512,10 +532,6 @@ CONFIG_SERIAL_OF_PLATFORM=y
CONFIG_UNIX98_PTYS=y
CONFIG_LEGACY_PTYS=y
CONFIG_LEGACY_PTY_COUNT=256
-
-#
-# IPMI
-#
# CONFIG_IPMI_HANDLER is not set
# CONFIG_WATCHDOG is not set
# CONFIG_HW_RANDOM is not set
@@ -526,10 +542,6 @@ CONFIG_LEGACY_PTY_COUNT=256
# CONFIG_AGP is not set
# CONFIG_DRM is not set
# CONFIG_RAW_DRIVER is not set
-
-#
-# TPM devices
-#
# CONFIG_TCG_TPM is not set
CONFIG_DEVPORT=y
# CONFIG_I2C is not set
@@ -539,11 +551,8 @@ CONFIG_DEVPORT=y
#
# CONFIG_SPI is not set
# CONFIG_SPI_MASTER is not set
-
-#
-# Dallas's 1-wire bus
-#
# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
# CONFIG_HWMON is not set
#
@@ -568,6 +577,7 @@ CONFIG_DEVPORT=y
#
# CONFIG_DISPLAY_SUPPORT is not set
# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
# CONFIG_FB is not set
# CONFIG_FB_IBM_GXT4500 is not set
@@ -575,10 +585,7 @@ CONFIG_DEVPORT=y
# Sound
#
# CONFIG_SOUND is not set
-
-#
-# USB support
-#
+CONFIG_USB_SUPPORT=y
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB_ARCH_HAS_OHCI=y
CONFIG_USB_ARCH_HAS_EHCI=y
@@ -593,28 +600,9 @@ CONFIG_USB_ARCH_HAS_EHCI=y
#
# CONFIG_USB_GADGET is not set
# CONFIG_MMC is not set
-
-#
-# LED devices
-#
# CONFIG_NEW_LEDS is not set
-
-#
-# LED drivers
-#
-
-#
-# LED Triggers
-#
-
-#
-# InfiniBand support
-#
# CONFIG_INFINIBAND is not set
-
-#
-# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
-#
+# CONFIG_EDAC is not set
#
# Real Time Clock
@@ -635,6 +623,11 @@ CONFIG_USB_ARCH_HAS_EHCI=y
#
#
+# Userspace I/O
+#
+# CONFIG_UIO is not set
+
+#
# File systems
#
CONFIG_EXT2_FS=y
@@ -694,6 +687,15 @@ CONFIG_RAMFS=y
# CONFIG_BEFS_FS is not set
# CONFIG_BFS_FS is not set
# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_SUMMARY is not set
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_RTIME=y
+# CONFIG_JFFS2_RUBIN is not set
CONFIG_CRAMFS=y
# CONFIG_VXFS_FS is not set
# CONFIG_HPFS_FS is not set
@@ -723,7 +725,6 @@ CONFIG_SUNRPC=y
# CONFIG_NCP_FS is not set
# CONFIG_CODA_FS is not set
# CONFIG_AFS_FS is not set
-# CONFIG_9P_FS is not set
#
# Partition Types
@@ -750,8 +751,10 @@ CONFIG_BITREVERSE=y
# CONFIG_CRC16 is not set
# CONFIG_CRC_ITU_T is not set
CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
# CONFIG_LIBCRC32C is not set
CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
CONFIG_PLIST=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
@@ -774,6 +777,7 @@ CONFIG_MAGIC_SYSRQ=y
CONFIG_DEBUG_KERNEL=y
# CONFIG_DEBUG_SHIRQ is not set
CONFIG_DETECT_SOFTLOCKUP=y
+CONFIG_SCHED_DEBUG=y
# CONFIG_SCHEDSTATS is not set
# CONFIG_TIMER_STATS is not set
# CONFIG_DEBUG_SLAB is not set
@@ -796,7 +800,6 @@ CONFIG_FORCED_INLINING=y
# CONFIG_DEBUG_PAGEALLOC is not set
# CONFIG_DEBUGGER is not set
# CONFIG_BDI_SWITCH is not set
-# CONFIG_BOOTX_TEXT is not set
# CONFIG_PPC_EARLY_DEBUG is not set
#
@@ -804,10 +807,6 @@ CONFIG_FORCED_INLINING=y
#
# CONFIG_KEYS is not set
# CONFIG_SECURITY is not set
-
-#
-# Cryptographic options
-#
CONFIG_CRYPTO=y
CONFIG_CRYPTO_ALGAPI=y
CONFIG_CRYPTO_BLKCIPHER=y
@@ -845,7 +844,4 @@ CONFIG_CRYPTO_DES=y
# CONFIG_CRYPTO_CRC32C is not set
# CONFIG_CRYPTO_CAMELLIA is not set
# CONFIG_CRYPTO_TEST is not set
-
-#
-# Hardware crypto devices
-#
+CONFIG_CRYPTO_HW=y
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* Re: ml403 ac97 driver
From: Joachim Förster @ 2007-07-30 7:33 UTC (permalink / raw)
To: linuxppc-embedded
In-Reply-To: <11858308.post@talk.nabble.com>
Hi Qin Lin,
On Sun, 2007-07-29 at 22:40 -0700, Qin Lin wrote:
> # insmod ac97_bus.ko
> # insmod snd-ac97-codec.ko
> # insmod ml403_ac97cr.ko
> [ 79.529114] ml403_ac97cr: remap controller memory region to 0xc500e000
> done
> [ 79.611803] ml403_ac97cr: request (playback) irq 7 done
> [ 79.674236] ml403_ac97cr: request (capture) irq 6 done
> [ 79.784291] snd-ml403_ac97cr: write access to codec register 0x26 with
> bad value 0x800f / 32783!
> [ 79.900247] snd-ml403_ac97cr: write access to codec register 0x26 with
> bad value 0xf / 15!
> [ 80.004284] snd-ml403_ac97cr: write access to codec register 0x2a with
> bad value 0x2801 / 10241!
> [ 80.116228] snd-ml403_ac97cr: write access to codec register 0x2a with
> bad value 0x3801 / 14337!
Completely fine.
> # ls -l /dev/snd
> crw-rw-rw- 1 root root 116, 0 Jan 1 00:01 controlC0
> crw-rw-rw- 1 root root 116, 4 Jan 1 00:01 hwC0D0
> crw-rw-rw- 1 root root 116, 5 Jan 1 00:01 hwC0D1
> crw-rw-rw- 1 root root 116, 6 Jan 1 00:01 hwC0D2
> crw-rw-rw- 1 root root 116, 7 Jan 1 00:01 hwC0D3
> crw-rw-rw- 1 root root 116, 24 Jan 1 00:01 pcmC0D0c
> crw-rw-rw- 1 root root 116, 16 Jan 1 00:01 pcmC0D0p
> crw-rw-rw- 1 root root 116, 1 Jan 1 00:01 seq
> crw-rw-rw- 1 root root 116, 33 Jan 1 00:01 timer
Ok, should suffice. [In my case snddevices made many other device
files.]
> # aplay -D /dev/snd/pcmC0D0p
> ALSA lib pcm.c:2144:(snd_pcm_open_noupdate) Unknown PCM /dev/snd/pcmC0D0p
Well, I think the way you specify the device is wrong. AFAIK the -D
option only accepts names which are defined in an ALSA configuration
file (.asoundrc & friends).
Furthermore: Did you try without any device (without -D option)? The
defaults should make ALSA pick the first available sound device. At
least, while I was testing, I didn't have to specify any device.
BTW: You need to specify the (.wav) file you want to play:
# aplay music.wav
Otherwise you won't here anything ;-). Read "man aplay" !
> # ./test_sound.out /dev/snd/pcmC0D0p
> ALSA lib pcm.c:2090:(snd_pcm_open_noupdate) Unknown PCM /dev/snd/pcmC0D0p
> cannot open audio device /dev/snd/pcmC0D0p (No such file or directory)
Ditto. But I haven't had a look into test_sound source yet, but it might
be the same issue.
Joachim
^ permalink raw reply
* RE: [PATCH 3/5 v3] Add the platform device support with RapidIO to MPC8641HPCN platform.
From: Zhang Wei-r63237 @ 2007-07-30 8:26 UTC (permalink / raw)
To: Arnd Bergmann, linuxppc-dev; +Cc: paulus, linux-kernel
In-Reply-To: <200707291556.35632.arnd@arndb.de>
Hi, Arnd,
I can change it as you metioned now.
Thanks!
-zw
> -----Original Message-----
> From: linux-kernel-owner@vger.kernel.org=20
> [mailto:linux-kernel-owner@vger.kernel.org] On Behalf Of Arnd Bergmann
> Sent: Sunday, July 29, 2007 9:57 PM
> To: linuxppc-dev@ozlabs.org
> Cc: Zhang Wei-r63237; galak@kernel.crashing.org;=20
> mporter@kernel.crashing.org; paulus@samba.org;=20
> linux-kernel@vger.kernel.org
> Subject: Re: [PATCH 3/5 v3] Add the platform device support=20
> with RapidIO to MPC8641HPCN platform.
>=20
> On Thursday 26 July 2007, Zhang Wei wrote:
> > +
> > +static struct of_device_id mpc86xx_of_ids[] =3D {
> > +=A0=A0=A0=A0=A0=A0=A0{ .type =3D "soc", },
> > +=A0=A0=A0=A0=A0=A0=A0{ .compatible =3D "fsl,rapidio-delta", },
> > +=A0=A0=A0=A0=A0=A0=A0{},
> > +};
>=20
> With the device tree source you have posted in 2/5, the=20
> rapidio node is
> a child of the soc bus, and it doesn't have any children of its own.
> Therefore it is completely equivalent to _only_ add the soc type
> to mpc86xx_of_ids[], as in=20
>=20
> static struct of_device_id mpc86xx_of_ids[] =3D {
> { .type =3D "soc", },
> {},
> };
>=20
> Even if you intend to add children to the rapidio node in the future,
> I'd think it would be more appropriate to have those scanned by
> the rapidio bus driver, not by of_platform.
>=20
> Arnd <><
>=20
> -
> To unsubscribe from this list: send the line "unsubscribe=20
> linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>=20
^ permalink raw reply
* Re: ml403 ac97 driver
From: Qin Lin @ 2007-07-30 8:28 UTC (permalink / raw)
To: linuxppc-embedded
In-Reply-To: <1185780815.5454.18.camel@localhost>
hi Joachim
i have hearing the music . Thanks. just use=20
#aplay music.wav=20
Before that i recompile the alsa-lib again. change configure options
later i will paste the whole commands so as anybody can reference it .
Joachim F=C3=B6rster wrote:
>=20
> Hi Qin Lin,
>=20
> On Sun, 2007-07-29 at 22:40 -0700, Qin Lin wrote:
>> # insmod ac97_bus.ko
>> # insmod snd-ac97-codec.ko
>> # insmod ml403_ac97cr.ko
>> [ 79.529114] ml403_ac97cr: remap controller memory region to 0xc500e00=
0
>> done
>> [ 79.611803] ml403_ac97cr: request (playback) irq 7 done
>> [ 79.674236] ml403_ac97cr: request (capture) irq 6 done
>> [ 79.784291] snd-ml403_ac97cr: write access to codec register 0x26 wit=
h
>> bad value 0x800f / 32783!
>> [ 79.900247] snd-ml403_ac97cr: write access to codec register 0x26 wit=
h
>> bad value 0xf / 15!
>> [ 80.004284] snd-ml403_ac97cr: write access to codec register 0x2a wit=
h
>> bad value 0x2801 / 10241!
>> [ 80.116228] snd-ml403_ac97cr: write access to codec register 0x2a wit=
h
>> bad value 0x3801 / 14337!
>=20
> Completely fine.
>=20
>> # ls -l /dev/snd
>> crw-rw-rw- 1 root root 116, 0 Jan 1 00:01 controlC0
>> crw-rw-rw- 1 root root 116, 4 Jan 1 00:01 hwC0D0
>> crw-rw-rw- 1 root root 116, 5 Jan 1 00:01 hwC0D1
>> crw-rw-rw- 1 root root 116, 6 Jan 1 00:01 hwC0D2
>> crw-rw-rw- 1 root root 116, 7 Jan 1 00:01 hwC0D3
>> crw-rw-rw- 1 root root 116, 24 Jan 1 00:01 pcmC0D0c
>> crw-rw-rw- 1 root root 116, 16 Jan 1 00:01 pcmC0D0p
>> crw-rw-rw- 1 root root 116, 1 Jan 1 00:01 seq
>> crw-rw-rw- 1 root root 116, 33 Jan 1 00:01 timer
>=20
> Ok, should suffice. [In my case snddevices made many other device
> files.]
>=20
>> # aplay -D /dev/snd/pcmC0D0p
>> ALSA lib pcm.c:2144:(snd_pcm_open_noupdate) Unknown PCM /dev/snd/pcmC0D0=
p
>=20
> Well, I think the way you specify the device is wrong. AFAIK the -D
> option only accepts names which are defined in an ALSA configuration
> file (.asoundrc & friends).
> Furthermore: Did you try without any device (without -D option)? The
> defaults should make ALSA pick the first available sound device. At
> least, while I was testing, I didn't have to specify any device.
>=20
> BTW: You need to specify the (.wav) file you want to play:
> # aplay music.wav
> Otherwise you won't here anything ;-). Read "man aplay" !
>=20
>> # ./test_sound.out /dev/snd/pcmC0D0p=20
>> ALSA lib pcm.c:2090:(snd_pcm_open_noupdate) Unknown PCM /dev/snd/pcmC0D0=
p
>> cannot open audio device /dev/snd/pcmC0D0p (No such file or directory)
>=20
> Ditto. But I haven't had a look into test_sound source yet, but it might
> be the same issue.
>=20
> Joachim
>=20
>=20
>=20
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>=20
>=20
--=20
View this message in context: http://www.nabble.com/Re%3A-ml403-ac97-driver=
-tf4164866.html#a11859770
Sent from the linuxppc-embedded mailing list archive at Nabble.com.
^ permalink raw reply
* Re: [ofa-general] [PATCH 1/2] ehca: remove checkpatch.pl's warnings "externs should be avoided in .c files"
From: Hoang-Nam Nguyen @ 2007-07-30 13:07 UTC (permalink / raw)
To: Roland Dreier; +Cc: linuxppc-dev, stefan.roscher, linux-kernel, general
In-Reply-To: <adahcnnvpy5.fsf@cisco.com>
Hi Roland!
> the patch looks fine except your mailer seems to have mangled
> it... can you resend so I can apply it?
Was going to recreate this patch, but then I saw that you
probably have incorporated it (manually) in your latest git.
Just want to make sure I'm seeing it right.
Anyway, appreciate your help!
Nam
^ permalink raw reply
* Re: Using video memory on PS3 e.g. as SWAP?
From: Marc Dietrich @ 2007-07-30 12:24 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <200707291904.55700.rene@exactcode.de>
Am Sunday 29 July 2007 19:04 schrieb Ren=E9 Rebe:
> Hi all,
>
> looking at the PS3 as one of the few PowerPC workstation options the RAM
> is obviously quite limitted with just 256MB. I wonder if the 256MB of
> video memory can be mapped or at least be used as super-fast SWAP?
look here:
http://forums.ps2dev.org/viewtopic.php?t=3D8267
but the write speed is much slower than disk.
> Or are there news regarding accessing the video chip from Linux beside
> the unaccelerated frame-buffer?
>
> Regards,
=2D-=20
"The enemy commits atrocities knowingly; if we make unfortunate mistakes, =
it=20
is involuntary."
Lord Arthur Ponsonby, "Falsehood in Wartime: Propaganda Lies of the Firs=
t=20
World War", 1928
^ permalink raw reply
* Re: [ofa-general] [PATCH 1/2] ehca: remove checkpatch.pl's warnings "externs should be avoided in .c files"
From: Roland Dreier @ 2007-07-30 13:54 UTC (permalink / raw)
To: Hoang-Nam Nguyen; +Cc: linuxppc-dev, stefan.roscher, linux-kernel, general
In-Reply-To: <200707301507.47575.hnguyen@linux.vnet.ibm.com>
> Was going to recreate this patch, but then I saw that you
> probably have incorporated it (manually) in your latest git.
> Just want to make sure I'm seeing it right.
Yes, I ended up doing it by hand. Thanks.
^ permalink raw reply
* Re: [PATCH 2/5] ehca: Generate event when SRQ limit reached
From: Hoang-Nam Nguyen @ 2007-07-30 15:02 UTC (permalink / raw)
To: Roland Dreier
Cc: fenkes, linux-kernel, openib-general, linuxppc-dev, raisch,
stefan.roscher
In-Reply-To: <ada7iou75tn.fsf@cisco.com>
Hi,
> BTW, does your SRQ-capable hardware support generating the "last WQE
> reached" event? There's not any reliable way to avoid problems when
> destroying QPs attached to an SRQ without it, and the IB spec requires
> CAs that support SRQs to generate it (o11-5.2.5 in chapter 11 of vol 1).
>
> I don't see any code in ehca to generate the event, and IPoIB CM at
> least will be very unhappy when using SRQs if the event is not
> generated.
Thanks for this good catch. We're investigating how to implement this.
Will keep you updated.
Regards
Nam
^ permalink raw reply
* Re: [patch][0/5] powerpc V2 : Add support to fully comply with IEEE-754 standard
From: Sergei Shtylyov @ 2007-07-30 14:56 UTC (permalink / raw)
To: Zhu Ebony-r57400; +Cc: linuxppc-dev, paulus
In-Reply-To: <32F3CC26D4DAC44E8ECD07155727A46E8B7F7F@zch01exm20.fsl.freescale.net>
Hello.
Zhu Ebony-r57400 wrote:
>>>>>>Did you end up getting testfloat running? I'd like to see some
>>>>>>testing results before accepting these patches. I think estfloat is
>>>>>>our best bet at this point.
>>>>>Hi Kumar,
>>>>>I looked into the testfloat suit, and found all the instructions it
>>>>>tests (more than 50)should be implemented based on ASM.
>>>>Don't follow? Can't you build it with the e500 compiler?
>>>The TestFloat suite provided the target of 386-Win32-gcc and
>>>SPARC-Solaris-gcc only, and a template for user to porting his own
>>>processor. Some general instructions are implemented in C, but some
>>>CPU specific instructions like evfsmul need to be implemented
>>>assemblely. To build it with e500 compiler we still Have some porting
>>>work to do.
>>I wouldn't worry too much about the vector forms. If the
>>scalar single fp and double fp test out ok the vectors are
>>pretty much similar enough.
>>Lets just get the scalar versions tested and work out any
>>issues there.
> OK, I will focus on scalar SFPF and DPFP versions first.
Any progress with this patchset?
WBR, Sergei
^ permalink raw reply
* [PATCH 3/6] PowerPC 440EPx: 440EPx/440EP dcr defines
From: Valentine Barshak @ 2007-07-30 15:12 UTC (permalink / raw)
To: linuxppc-dev
This patch adds DCR defines needed for 440EP/440EPx clock initialization.
These defines have been introduced in the Bamboo support by Josh Boyer
and are needed for Sequoia as well.
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
---
arch/powerpc/boot/dcr.h | 11 +++++++++++
1 files changed, 11 insertions(+)
diff -ruN linux.orig/arch/powerpc/boot/dcr.h linux/arch/powerpc/boot/dcr.h
--- linux.orig/arch/powerpc/boot/dcr.h 2007-07-27 20:37:10.000000000 +0400
+++ linux/arch/powerpc/boot/dcr.h 2007-07-27 21:06:11.000000000 +0400
@@ -121,4 +121,15 @@
#define DCRN_CPC0_MIRQ1 0x0ed
#define DCRN_CPC0_JTAGID 0x0ef
+/* 440EP/440EPx Clock/Power-on Reset regs */
+#define DCRN_CPR0_ADDR 0xc
+#define DCRN_CPR0_DATA 0xd
+#define CPR0_PLLD0 0x60
+#define CPR0_OPBD0 0xc0
+#define CPR0_PERD0 0xe0
+#define CPR0_PRIMBD0 0xa0
+#define CPR0_SCPID 0x120
+#define CPR0_PLLC0 0x40
+
+
#endif /* _PPC_BOOT_DCR_H_ */
^ permalink raw reply
* [PATCH 4/6] PowerPC 440EPx: Sequoia bootwrapper
From: Valentine Barshak @ 2007-07-30 15:14 UTC (permalink / raw)
To: linuxppc-dev
A bootwrapper code for Sequoia.
Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
---
arch/powerpc/boot/44x.h | 1
arch/powerpc/boot/Makefile | 6
arch/powerpc/boot/cuboot-sequoia.c | 31 ++++
arch/powerpc/boot/sequoia.c | 234 +++++++++++++++++++++++++++++++++++
arch/powerpc/boot/treeboot-sequoia.c | 27 ++++
5 files changed, 297 insertions(+), 2 deletions(-)
diff -ruN linux.orig/arch/powerpc/boot/44x.h linux/arch/powerpc/boot/44x.h
--- linux.orig/arch/powerpc/boot/44x.h 2007-07-27 20:37:10.000000000 +0400
+++ linux/arch/powerpc/boot/44x.h 2007-07-27 20:44:26.000000000 +0400
@@ -15,5 +15,6 @@
void ibm44x_dbcr_reset(void);
void ebony_init(void *mac0, void *mac1);
+void sequoia_init(void *mac0, void *mac1);
#endif /* _PPC_BOOT_44X_H_ */
diff -ruN linux.orig/arch/powerpc/boot/cuboot-sequoia.c linux/arch/powerpc/boot/cuboot-sequoia.c
--- linux.orig/arch/powerpc/boot/cuboot-sequoia.c 1970-01-01 03:00:00.000000000 +0300
+++ linux/arch/powerpc/boot/cuboot-sequoia.c 2007-07-27 20:44:26.000000000 +0400
@@ -0,0 +1,31 @@
+/*
+ * Old U-boot compatibility for Sequoia
+ *
+ * Based on Ebony code by David Gibson <david@gibson.dropbear.id.au>
+ *
+ * Copyright 2007 David Gibson, IBM Corporatio.
+ * Based on cuboot-83xx.c, which is:
+ * Copyright (c) 2007 Freescale Semiconductor, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published
+ * by the Free Software Foundation.
+ */
+
+#include "ops.h"
+#include "stdio.h"
+#include "44x.h"
+#include "cuboot.h"
+
+#define TARGET_4xx
+#define TARGET_44x
+#include "ppcboot.h"
+
+static bd_t bd;
+
+void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
+ unsigned long r6, unsigned long r7)
+{
+ CUBOOT_INIT();
+ sequoia_init(&bd.bi_enetaddr, &bd.bi_enet1addr);
+}
diff -ruN linux.orig/arch/powerpc/boot/Makefile linux/arch/powerpc/boot/Makefile
--- linux.orig/arch/powerpc/boot/Makefile 2007-07-27 20:37:10.000000000 +0400
+++ linux/arch/powerpc/boot/Makefile 2007-07-27 20:44:26.000000000 +0400
@@ -44,10 +44,11 @@
src-wlib := string.S crt0.S stdio.c main.c flatdevtree.c flatdevtree_misc.c \
ns16550.c serial.c simple_alloc.c div64.S util.S \
gunzip_util.c elf_util.c $(zlib) devtree.c oflib.c ofconsole.c \
- 44x.c ebony.c mv64x60.c mpsc.c mv64x60_i2c.c cuboot.c
+ 44x.c ebony.c mv64x60.c mpsc.c mv64x60_i2c.c cuboot.c \
+ sequoia.c
src-plat := of.c cuboot-83xx.c cuboot-85xx.c holly.c \
cuboot-ebony.c treeboot-ebony.c prpmc2800.c \
- ps3-head.S ps3-hvcall.S ps3.c
+ ps3-head.S ps3-hvcall.S ps3.c treeboot-sequoia.c cuboot-sequoia.c
src-boot := $(src-wlib) $(src-plat) empty.c
src-boot := $(addprefix $(obj)/, $(src-boot))
@@ -142,6 +143,7 @@
image-$(CONFIG_PPC_83xx) += cuImage.83xx
image-$(CONFIG_PPC_85xx) += cuImage.85xx
image-$(CONFIG_EBONY) += treeImage.ebony cuImage.ebony
+image-$(CONFIG_SEQUOIA) += treeImage.sequoia cuImage.sequoia
endif
# For 32-bit powermacs, build the COFF and miboot images
diff -ruN linux.orig/arch/powerpc/boot/sequoia.c linux/arch/powerpc/boot/sequoia.c
--- linux.orig/arch/powerpc/boot/sequoia.c 1970-01-01 03:00:00.000000000 +0300
+++ linux/arch/powerpc/boot/sequoia.c 2007-07-27 20:59:09.000000000 +0400
@@ -0,0 +1,234 @@
+/*
+ * Based on Bamboo code by Josh Boyer <jwboyer@linux.vnet.ibm.com>
+ * Copyright IBM Corporation, 2007
+ *
+ * Based on ebony wrapper:
+ * Copyright 2007 David Gibson, IBM Corporation.
+ *
+ * Clocking code based on code by:
+ * Stefan Roese <sr@denx.de>
+ *
+ * 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; version 2 of the License
+ */
+#include <stdarg.h>
+#include <stddef.h>
+#include "types.h"
+#include "elf.h"
+#include "string.h"
+#include "stdio.h"
+#include "page.h"
+#include "ops.h"
+#include "dcr.h"
+#include "44x.h"
+
+extern char _dtb_start[];
+extern char _dtb_end[];
+
+static u8 *sequoia_mac0, *sequoia_mac1;
+
+#define SPRN_CCR1 0x378
+void ibm440ep_fixup_clocks(unsigned int sysclk, unsigned int ser_clk)
+{
+ u32 cpu, plb, opb, ebc, tb, uart0, m, vco;
+ u32 reg;
+ u32 fwdva, fwdvb, fbdv, lfbdv, opbdv0, perdv0, spcid0, prbdv0, tmp;
+
+ mtdcr(DCRN_CPR0_ADDR, CPR0_PLLD0);
+ reg = mfdcr(DCRN_CPR0_DATA);
+ tmp = (reg & 0x000F0000) >> 16;
+ fwdva = tmp ? tmp : 16;
+ tmp = (reg & 0x00000700) >> 8;
+ fwdvb = tmp ? tmp : 8;
+ tmp = (reg & 0x1F000000) >> 24;
+ fbdv = tmp ? tmp : 32;
+ lfbdv = (reg & 0x0000007F);
+
+ mtdcr(DCRN_CPR0_ADDR, CPR0_OPBD0);
+ reg = mfdcr(DCRN_CPR0_DATA);
+ tmp = (reg & 0x03000000) >> 24;
+ opbdv0 = tmp ? tmp : 4;
+
+ mtdcr(DCRN_CPR0_ADDR, CPR0_PERD0);
+ reg = mfdcr(DCRN_CPR0_DATA);
+ tmp = (reg & 0x07000000) >> 24;
+ perdv0 = tmp ? tmp : 8;
+
+ mtdcr(DCRN_CPR0_ADDR, CPR0_PRIMBD0);
+ reg = mfdcr(DCRN_CPR0_DATA);
+ tmp = (reg & 0x07000000) >> 24;
+ prbdv0 = tmp ? tmp : 8;
+
+ mtdcr(DCRN_CPR0_ADDR, CPR0_SCPID);
+ reg = mfdcr(DCRN_CPR0_DATA);
+ tmp = (reg & 0x03000000) >> 24;
+ spcid0 = tmp ? tmp : 4;
+
+ /* Calculate M */
+ mtdcr(DCRN_CPR0_ADDR, CPR0_PLLC0);
+ reg = mfdcr(DCRN_CPR0_DATA);
+ tmp = (reg & 0x03000000) >> 24;
+ if (tmp == 0) { /* PLL output */
+ tmp = (reg & 0x20000000) >> 29;
+ if (!tmp) /* PLLOUTA */
+ m = fbdv * lfbdv * fwdva;
+ else
+ m = fbdv * lfbdv * fwdvb;
+ }
+ else if (tmp == 1) /* CPU output */
+ m = fbdv * fwdva;
+ else
+ m = perdv0 * opbdv0 * fwdvb;
+
+ vco = (m * sysclk) + (m >> 1);
+ cpu = vco / fwdva;
+ plb = vco / fwdvb / prbdv0;
+ opb = plb / opbdv0;
+ ebc = plb / perdv0;
+
+ /* FIXME */
+ uart0 = ser_clk;
+
+ /* Figure out timebase. Either CPU or default TmrClk */
+ asm volatile (
+ "mfspr %0,%1\n"
+ :
+ "=&r"(reg) : "i"(SPRN_CCR1));
+ if (reg & 0x0080)
+ tb = 25000000; /* TmrClk is 25MHz */
+ else
+ tb = cpu;
+
+ dt_fixup_cpu_clocks(cpu, tb, 0);
+ dt_fixup_clock("/plb", plb);
+ dt_fixup_clock("/plb/opb", opb);
+ dt_fixup_clock("/plb/opb/ebc", ebc);
+ dt_fixup_clock("/plb/opb/serial@ef600300", uart0);
+ dt_fixup_clock("/plb/opb/serial@ef600400", uart0);
+ dt_fixup_clock("/plb/opb/serial@ef600500", uart0);
+ dt_fixup_clock("/plb/opb/serial@ef600600", uart0);
+}
+
+
+/*
+ * 440EPx DDR1/2 memory controller code
+ * TODO: move to generic 44x code
+ */
+
+/* DDR0_02 */
+#define DDR_START 0x1
+#define DDR_START_SHIFT 0
+#define DDR_MAX_CS_REG 0x3
+#define DDR_MAX_CS_REG_SHIFT 24
+#define DDR_MAX_COL_REG 0xf
+#define DDR_MAX_COL_REG_SHIFT 16
+#define DDR_MAX_ROW_REG 0xf
+#define DDR_MAX_ROW_REG_SHIFT 8
+/* DDR0_08 */
+#define DDR_DDR2_MODE 0x1
+#define DDR_DDR2_MODE_SHIFT 0
+/* DDR0_10 */
+#define DDR_CS_MAP 0x3
+#define DDR_CS_MAP_SHIFT 8
+/* DDR0_14 */
+#define DDR_REDUC 0x1
+#define DDR_REDUC_SHIFT 16
+/* DDR0_42 */
+#define DDR_APIN 0x7
+#define DDR_APIN_SHIFT 24
+/* DDR0_43 */
+#define DDR_COL_SZ 0x7
+#define DDR_COL_SZ_SHIFT 8
+#define DDR_BANK8 0x1
+#define DDR_BANK8_SHIFT 0
+
+#define DDR_GET_VAL(val, mask, shift) (((val) >> (shift)) & (mask))
+
+static void ibm440epx_fixup_memsize(void)
+{
+ unsigned long val, max_cs, max_col, max_row;
+ unsigned long cs, col, row, bank, dpath;
+ unsigned long memsize;
+
+ mtdcr(DCRN_SDRAM0_CFGADDR, 2);
+ val = mfdcr(DCRN_SDRAM0_CFGDATA);
+ if (!DDR_GET_VAL(val, DDR_START, DDR_START_SHIFT))
+ fatal("DDR controller is not initialized\n");
+
+ /* get maximum cs col and row values */
+ max_cs = DDR_GET_VAL(val, DDR_MAX_CS_REG, DDR_MAX_CS_REG_SHIFT);
+ max_col = DDR_GET_VAL(val, DDR_MAX_COL_REG, DDR_MAX_COL_REG_SHIFT);
+ max_row = DDR_GET_VAL(val, DDR_MAX_ROW_REG, DDR_MAX_ROW_REG_SHIFT);
+
+ /* get CS value */
+ mtdcr(DCRN_SDRAM0_CFGADDR, 10);
+ val = mfdcr(DCRN_SDRAM0_CFGDATA);
+
+ val = DDR_GET_VAL(val, DDR_CS_MAP, DDR_CS_MAP_SHIFT);
+ cs = 0;
+ while (val) {
+ if (val && 0x1)
+ cs++;
+ val = val >> 1;
+ }
+
+ if (!cs)
+ fatal("No memory installed\n");
+ if (cs > max_cs)
+ fatal("DDR wrong CS configuration\n");
+
+ /* get data path bytes */
+ mtdcr(DCRN_SDRAM0_CFGADDR, 14);
+ val = mfdcr(DCRN_SDRAM0_CFGDATA);
+
+ if (DDR_GET_VAL(val, DDR_REDUC, DDR_REDUC_SHIFT))
+ dpath = 8; /* 64 bits */
+ else
+ dpath = 4; /* 32 bits */
+
+ /* get adress pins (rows) */
+ mtdcr(DCRN_SDRAM0_CFGADDR, 42);
+ val = mfdcr(DCRN_SDRAM0_CFGDATA);
+
+ row = DDR_GET_VAL(val, DDR_APIN, DDR_APIN_SHIFT);
+ if (row > max_row)
+ fatal("DDR wrong APIN configuration\n");
+ row = max_row - row;
+
+ /* get collomn size and banks */
+ mtdcr(DCRN_SDRAM0_CFGADDR, 43);
+ val = mfdcr(DCRN_SDRAM0_CFGDATA);
+
+ col = DDR_GET_VAL(val, DDR_COL_SZ, DDR_COL_SZ_SHIFT);
+ if (col > max_col)
+ fatal("DDR wrong COL configuration\n");
+ col = max_col - col;
+
+ if (DDR_GET_VAL(val, DDR_BANK8, DDR_BANK8_SHIFT))
+ bank = 8; /* 8 banks */
+ else
+ bank = 4; /* 4 banks */
+
+ memsize = cs * (1 << (col+row)) * bank * dpath;
+ dt_fixup_memory(0, memsize);
+}
+
+static void sequoia_fixups(void)
+{
+ unsigned long sysclk = 33333333;
+ ibm440ep_fixup_clocks(sysclk, 11059200);
+ ibm4xx_fixup_ebc_ranges("/plb/opb/ebc");
+ ibm440epx_fixup_memsize();
+ dt_fixup_mac_addresses(sequoia_mac0, sequoia_mac1);
+}
+
+void sequoia_init(void *mac0, void *mac1)
+{
+ platform_ops.fixups = sequoia_fixups;
+ platform_ops.exit = ibm44x_dbcr_reset;
+ sequoia_mac0 = mac0;
+ sequoia_mac1 = mac1;
+ ft_init(_dtb_start, 0, 32);
+ serial_console_init();
+}
diff -ruN linux.orig/arch/powerpc/boot/treeboot-sequoia.c linux/arch/powerpc/boot/treeboot-sequoia.c
--- linux.orig/arch/powerpc/boot/treeboot-sequoia.c 1970-01-01 03:00:00.000000000 +0300
+++ linux/arch/powerpc/boot/treeboot-sequoia.c 2007-07-27 20:44:26.000000000 +0400
@@ -0,0 +1,27 @@
+/*
+ * Based on Bamboo code by Josh Boyer <jwboyer@linux.vnet.ibm.com>
+ * Copyright IBM Corporation, 2007
+ *
+ * Based on ebony wrapper:
+ * Copyright 2007 David Gibson, IBM Corporation.
+ *
+ * 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; version 2 of the License
+ */
+#include "ops.h"
+#include "stdio.h"
+#include "44x.h"
+
+extern char _end[];
+
+BSS_STACK(4096);
+
+void platform_init(void)
+{
+ unsigned long end_of_ram = 0x10000000;
+ unsigned long avail_ram = end_of_ram - (unsigned long)_end;
+
+ simple_alloc_init(_end, avail_ram, 32, 64);
+ sequoia_init(NULL, NULL);
+}
^ permalink raw reply
* [PATCH 5/6] PowerPC 440EPx: Sequoia board support
From: Valentine Barshak @ 2007-07-30 15:16 UTC (permalink / raw)
To: linuxppc-dev
AMCC 440EPx Sequoia board support.
Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
---
arch/powerpc/kernel/cputable.c | 36 +++++++++++++++++++
arch/powerpc/kernel/head_44x.S | 2 -
arch/powerpc/platforms/44x/Kconfig | 17 ++++++++-
arch/powerpc/platforms/44x/Makefile | 1
arch/powerpc/platforms/44x/sequoia.c | 66 +++++++++++++++++++++++++++++++++++
5 files changed, 120 insertions(+), 2 deletions(-)
diff -ruN linux.orig/arch/powerpc/kernel/cputable.c linux/arch/powerpc/kernel/cputable.c
--- linux.orig/arch/powerpc/kernel/cputable.c 2007-07-27 20:37:10.000000000 +0400
+++ linux/arch/powerpc/kernel/cputable.c 2007-07-27 20:44:26.000000000 +0400
@@ -1132,6 +1132,42 @@
.dcache_bsize = 32,
.platform = "ppc440",
},
+ { /* 440EPX - with Security/Kasumi */
+ .pvr_mask = 0xf0000fff,
+ .pvr_value = 0x200008D0,
+ .cpu_name = "440EPX - with Security/Kasumi",
+ .cpu_features = CPU_FTRS_44X,
+ .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU, /* 440EPX has an FPU */
+ .icache_bsize = 32,
+ .dcache_bsize = 32,
+ },
+ { /* 440EPX - without Security/Kasumi */
+ .pvr_mask = 0xf0000fff,
+ .pvr_value = 0x200008D4,
+ .cpu_name = "440EPX - no Security/Kasumi",
+ .cpu_features = CPU_FTRS_44X,
+ .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU, /* 440EPX has an FPU */
+ .icache_bsize = 32,
+ .dcache_bsize = 32,
+ },
+ { /* 440GRX - with Security/Kasumi */
+ .pvr_mask = 0xf0000fff,
+ .pvr_value = 0x200008D8,
+ .cpu_name = "440GRX - with Security/Kasumi",
+ .cpu_features = CPU_FTRS_44X,
+ .cpu_user_features = COMMON_USER_BOOKE, /* 440GRX has no FPU */
+ .icache_bsize = 32,
+ .dcache_bsize = 32,
+ },
+ { /* 440GRX - without Security/Kasumi */
+ .pvr_mask = 0xf0000fff,
+ .pvr_value = 0x200008DC,
+ .cpu_name = "440GRX - no Security/Kasumi",
+ .cpu_features = CPU_FTRS_44X,
+ .cpu_user_features = COMMON_USER_BOOKE, /* 440GRX has no FPU */
+ .icache_bsize = 32,
+ .dcache_bsize = 32,
+ },
{ /* 440GP Rev. B */
.pvr_mask = 0xf0000fff,
.pvr_value = 0x40000440,
diff -ruN linux.orig/arch/powerpc/kernel/head_44x.S linux/arch/powerpc/kernel/head_44x.S
--- linux.orig/arch/powerpc/kernel/head_44x.S 2007-07-27 20:37:10.000000000 +0400
+++ linux/arch/powerpc/kernel/head_44x.S 2007-07-27 20:44:26.000000000 +0400
@@ -217,7 +217,7 @@
lis r4,interrupt_base@h /* IVPR only uses the high 16-bits */
mtspr SPRN_IVPR,r4
-#ifdef CONFIG_440EP
+#if defined(CONFIG_440EP) || defined(CONFIG_440EPX)
/* Clear DAPUIB flag in CCR0 (enable APU between CPU and FPU) */
mfspr r2,SPRN_CCR0
lis r3,0xffef
diff -ruN linux.orig/arch/powerpc/platforms/44x/Kconfig linux/arch/powerpc/platforms/44x/Kconfig
--- linux.orig/arch/powerpc/platforms/44x/Kconfig 2007-07-27 20:37:11.000000000 +0400
+++ linux/arch/powerpc/platforms/44x/Kconfig 2007-07-27 21:10:32.000000000 +0400
@@ -14,6 +14,14 @@
help
This option enables support for the IBM PPC440GP evaluation board.
+config SEQUOIA
+ bool "Sequoia"
+ depends on 44x
+ default n
+ select 440EPX
+ help
+ This option enables support for the AMCC PPC440EPX evaluation board.
+
#config LUAN
# bool "Luan"
# depends on 44x
@@ -36,6 +44,13 @@
select PPC_FPU
select IBM440EP_ERR42
+config 440EPX
+ bool
+ select PPC_FPU
+# Disabled until the new EMAC Driver is merged.
+# select IBM_NEW_EMAC_EMAC4
+# select IBM_NEW_EMAC_ZMII
+
config 440GP
bool
# Disabled until the new EMAC Driver is merged.
@@ -49,7 +64,7 @@
config 440A
bool
- depends on 440GX
+ depends on 440GX || 440EPX
default y
# 44x errata/workaround config symbols, selected by the CPU models above
diff -ruN linux.orig/arch/powerpc/platforms/44x/Makefile linux/arch/powerpc/platforms/44x/Makefile
--- linux.orig/arch/powerpc/platforms/44x/Makefile 2007-07-27 20:37:11.000000000 +0400
+++ linux/arch/powerpc/platforms/44x/Makefile 2007-07-27 20:44:26.000000000 +0400
@@ -1,2 +1,3 @@
obj-$(CONFIG_44x) := misc_44x.o
obj-$(CONFIG_EBONY) += ebony.o
+obj-$(CONFIG_SEQUOIA) += sequoia.o
diff -ruN linux.orig/arch/powerpc/platforms/44x/sequoia.c linux/arch/powerpc/platforms/44x/sequoia.c
--- linux.orig/arch/powerpc/platforms/44x/sequoia.c 1970-01-01 03:00:00.000000000 +0300
+++ linux/arch/powerpc/platforms/44x/sequoia.c 2007-07-27 20:44:26.000000000 +0400
@@ -0,0 +1,66 @@
+/*
+ * Sequoia board specific routines
+ *
+ * Wade Farnsworth <wfarnsworth@mvista.com>
+ * Copyright 2004-2007 MontaVista Software Inc.
+ *
+ * Rewritten and ported to the merged powerpc tree:
+ * Josh Boyer <jwboyer@linux.vnet.ibm.com>
+ * Copyright 2007 IBM Corporation
+ *
+ * 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.
+ */
+#include <linux/init.h>
+#include <asm/machdep.h>
+#include <asm/prom.h>
+#include <asm/udbg.h>
+#include <asm/time.h>
+#include <asm/uic.h>
+#include <asm/of_platform.h>
+#include "44x.h"
+
+static struct of_device_id sequoia_of_bus[] = {
+ { .compatible = "ibm,plb", },
+ { .compatible = "ibm,opb", },
+ { .compatible = "ibm,ebc", },
+ {},
+};
+
+static int __init sequoia_device_probe(void)
+{
+ if (!machine_is(sequoia))
+ return 0;
+
+ of_platform_bus_probe(NULL, sequoia_of_bus, NULL);
+
+ return 0;
+}
+device_initcall(sequoia_device_probe);
+
+static int __init sequoia_probe(void)
+{
+ unsigned long root = of_get_flat_dt_root();
+
+ if (!of_flat_dt_is_compatible(root, "amcc,sequoia"))
+ return 0;
+
+ return 1;
+}
+
+static void __init sequoia_setup_arch(void)
+{
+}
+
+define_machine(sequoia) {
+ .name = "Sequoia",
+ .probe = sequoia_probe,
+ .setup_arch = sequoia_setup_arch,
+ .progress = udbg_progress,
+ .init_IRQ = uic_init_tree,
+ .get_irq = uic_get_irq,
+ .restart = ppc44x_reset_system,
+ .calibrate_decr = generic_calibrate_decr,
+};
^ 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