* [PATCH 1/10] Add the mpc8641 hpcn Kconfig and Makefiles.
From: Jon Loeliger @ 2006-06-07 22:34 UTC (permalink / raw)
To: linuxppc-dev@ozlabs.org
Signed-off-by: Xianghua Xiao <x.xiao@freescale.com>
Signed-off-by: Jon Loeliger <jdl@freescale.com>
---
arch/powerpc/Kconfig | 15 ++++++++++-
arch/powerpc/platforms/Makefile | 1 +
arch/powerpc/platforms/86xx/Makefile | 7 +++++
arch/powerpc/platforms/86xx/Kconfig | 46 ++++++++++++++++++++++++++++++++++
drivers/i2c/busses/Kconfig | 4 +--
5 files changed, 69 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 75ba0ec..e708401 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -141,6 +141,15 @@ config PPC_85xx
select FSL_SOC
select 85xx
+config PPC_86xx
+ bool "Freescale 86xx"
+ select 6xx
+ select FSL_SOC
+ select PPC_FPU
+ select ALTIVEC
+ help
+ The Freescale E600 SoCs have 74xx cores.
+
config 40x
bool "AMCC 40x"
@@ -549,6 +558,7 @@ source arch/powerpc/platforms/embedded6x
source arch/powerpc/platforms/4xx/Kconfig
source arch/powerpc/platforms/83xx/Kconfig
source arch/powerpc/platforms/85xx/Kconfig
+source arch/powerpc/platforms/86xx/Kconfig
source arch/powerpc/platforms/8xx/Kconfig
source arch/powerpc/platforms/cell/Kconfig
@@ -780,6 +790,7 @@ config GENERIC_ISA_DMA
config PPC_I8259
bool
+ default y if PPC_86xx
default n
config PPC_INDIRECT_PCI
@@ -802,8 +813,8 @@ config MCA
bool
config PCI
- bool "PCI support" if 40x || CPM2 || PPC_83xx || PPC_85xx || PPC_MPC52xx || (EMBEDDED && PPC_ISERIES)
- default y if !40x && !CPM2 && !8xx && !APUS && !PPC_83xx && !PPC_85xx
+ bool "PCI support" if 40x || CPM2 || PPC_83xx || PPC_85xx || PPC_86xx || PPC_MPC52xx || (EMBEDDED && PPC_ISERIES)
+ default y if !40x && !CPM2 && !8xx && !APUS && !PPC_83xx && !PPC_85xx && !PPC_86xx
default PCI_PERMEDIA if !4xx && !CPM2 && !8xx && APUS
default PCI_QSPAN if !4xx && !CPM2 && 8xx
help
diff --git a/arch/powerpc/platforms/Makefile b/arch/powerpc/platforms/Makefile
index c4f6b0d..2928636 100644
--- a/arch/powerpc/platforms/Makefile
+++ b/arch/powerpc/platforms/Makefile
@@ -9,6 +9,7 @@ obj-$(CONFIG_PPC_CHRP) += chrp/
obj-$(CONFIG_4xx) += 4xx/
obj-$(CONFIG_PPC_83xx) += 83xx/
obj-$(CONFIG_PPC_85xx) += 85xx/
+obj-$(CONFIG_PPC_86xx) += 86xx/
obj-$(CONFIG_PPC_PSERIES) += pseries/
obj-$(CONFIG_PPC_ISERIES) += iseries/
obj-$(CONFIG_PPC_MAPLE) += maple/
diff --git a/arch/powerpc/platforms/86xx/Makefile b/arch/powerpc/platforms/86xx/Makefile
new file mode 100644
index 0000000..8a237a1
--- /dev/null
+++ b/arch/powerpc/platforms/86xx/Makefile
@@ -0,0 +1,7 @@
+#
+# Makefile for the PowerPC 86xx linux kernel.
+#
+
+obj-$(CONFIG_PPC_86xx) += mpc86xx_hpcn.o misc.o
+obj-$(CONFIG_MPC8641_HPCN) += mpc8641_hpcn.o
+obj-$(CONFIG_PCI) += pci.o pex.o
diff --git a/arch/powerpc/platforms/86xx/Kconfig b/arch/powerpc/platforms/86xx/Kconfig
new file mode 100644
index 0000000..b8924e7
--- /dev/null
+++ b/arch/powerpc/platforms/86xx/Kconfig
@@ -0,0 +1,46 @@
+menu "Platform Support"
+ depends on PPC_86xx
+
+choice
+ prompt "Machine Type"
+ default MPC8641_HPCN
+
+config MPC8641_HPCN
+ bool "Freescale MPC8641 HPCN"
+ help
+ This option enables support for the MPC8641 HPCN board.
+
+endchoice
+
+
+config MPC8641
+ bool
+ select PPC_INDIRECT_PCI
+ select PPC_UDBG_16550
+ default y if MPC8641_HPCN
+
+config MPIC
+ bool
+ default y
+
+config PPC_INDIRECT_PCI_BE
+ bool
+ depends on PPC_86xx
+ default y
+
+config PEX
+ bool "PCI Express support"
+ depends on PCI && PPC_86xx
+ default y
+
+config I8259_LEVEL_TRIGGER
+ bool
+ depends on MPC8641
+ default y
+
+config PPC_STD_MMU
+ bool
+ depends on PPC_86xx
+ default y
+
+endmenu
diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
index d6d4494..fbeae82 100644
--- a/drivers/i2c/busses/Kconfig
+++ b/drivers/i2c/busses/Kconfig
@@ -252,12 +252,12 @@ config I2C_POWERMAC
will be called i2c-powermac.
config I2C_MPC
- tristate "MPC107/824x/85xx/52xx"
+ tristate "MPC107/824x/85xx/52xx/86xx"
depends on I2C && PPC32
help
If you say yes to this option, support will be included for the
built-in I2C interface on the MPC107/Tsi107/MPC8240/MPC8245 and
- MPC85xx family processors. The driver may also work on 52xx
+ MPC85xx/MPC8641 family processors. The driver may also work on 52xx
family processors, though interrupts are known not to work.
This driver can also be built as a module. If so, the module
^ permalink raw reply related
* [PATCH 0/10] Add MPC8641 HPCN Platform
From: Jon Loeliger @ 2006-06-07 22:32 UTC (permalink / raw)
To: linuxppc-dev@ozlabs.org
This series of patches introduces the MPC8641 HPCN platform.
Please consider this for addition into the 2.6.18 queue.
Signed-off-by: Jon Loeliger <jdl@freescale.com>
Signed-off-by: Xianghua Xiao <x.xiao@freescale.com>
Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
Signed-off-by: Wei Zhang <Wei.Zhang@freescale.com>
Signed-off-by: Jeff Brown <Jeff.Brown@freescale.com>
Signed-off-by: Kriston Carson <KristonCarson@freescale.com>
arch/powerpc/Kconfig | 15
arch/powerpc/platforms/Makefile | 1
arch/powerpc/platforms/86xx/Makefile | 7
arch/powerpc/platforms/86xx/Kconfig | 46 +
drivers/i2c/busses/Kconfig | 4
arch/powerpc/platforms/86xx/misc.c | 50 +
arch/powerpc/platforms/86xx/mpc8641_hpcn.c | 52 ++
arch/powerpc/platforms/86xx/mpc8641_hpcn.h | 54 ++
arch/powerpc/platforms/86xx/mpc86xx.h | 31 +
arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 313 +++++++++
arch/powerpc/platforms/86xx/pci.c | 213 ++++++
arch/powerpc/platforms/86xx/pex.c | 173 +++++
arch/powerpc/kernel/cpu_setup_6xx.S | 2
arch/powerpc/kernel/cputable.c | 12
arch/powerpc/kernel/head_32.S | 15
arch/powerpc/sysdev/i8259.c | 5
include/asm-powerpc/immap_86xx.h | 199 ++++++
include/asm-powerpc/irq.h | 88 +++
include/asm-powerpc/mpc86xx.h | 95 +++
include/asm-powerpc/reg.h | 1
include/asm-ppc/io.h | 2
include/asm-ppc/ppc_sys.h | 2
include/asm-ppc/serial.h | 2
arch/powerpc/configs/mpc8641_hpcn_defconfig | 923 +++++++++++++++++++++++++++
drivers/net/Kconfig | 6
drivers/net/phy/Kconfig | 5
drivers/net/phy/Makefile | 1
drivers/net/phy/vitesse.c | 136 ++++
arch/powerpc/kernel/prom.c | 13
29 files changed, 2457 insertions(+), 9 deletions(-)
^ permalink raw reply
* MPC5200B SPI PSC3 Problem
From: Trueskew @ 2006-06-07 22:21 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 10899 bytes --]
We have an AIC26 codec connected to our Lite5200B platform via J21. I've
used MPC5200BUG to configure PSC3 as an SPI master, along with some samples
I've found online (including here) and some I received from Freescale.
Although the transfers seem to be working as expected (please see the output
file at the end of this message), I get only 0xffff back. This occurs
whether or not the device is attached to J21. A scope shows that PSC3_8
(SPI_SS) and PSC3_9 (SPI_CLK) are low at all times, and I'm concerned I'm
still doing something wrong with respect to enabling SPI over PSC3.
I'm including my driver initialization code, my write code, and output
showing the write behavior. If someone could comment on it, I would greatly
appreciate it... or if someone flat out has code to do this, I'd be happy to
take it from you. I've seen a few variations, but whether I use them
directly or modify them as I need to, I can't seem to get past this. Of
course, any other suggestions are welcome.
Thanks.
Sal
---------------------------------------------------------------------------
Initialization Code
---------------------------------------------------------------------------
#define GPIO_PSC3_PORT_CONFIG_MASK 0x00000f00
#ifdef SPI_USE_MCLK
#define GPIO_PSC3_PORT_CONFIG 0x00000700 /* PSC3 mode with mclk */
#else /* SPI_USE_MCLK */
#define GPIO_PSC3_PORT_CONFIG 0x00000600 /* PSC3 mode */
#endif /* SPI_USE_MCLK */
#define CDM_PSC3_MCLK_ENABLE 0x00000080
#define CDM_PSC3_MCLK_CONFIG 0x8020 /* Divide Fvco ftom 528 to
16Mhz */
#define PSC3_SICR_REG_VALUE 0x0280f000 /* 16-bit select Codec SPI
master mode, msb first,
UseEOF=1. GenClk=1, SIM,
CPOL and CPHA are
function input */
...
/* Select the Pin-Muxing for PSC3 Codec mode */
gpio = (struct mpc52xx_gpio *) ioremap(MPC52xx_GPIO,
sizeof(struct mpc52xx_gpio));
if(gpio)
{
port_config = gpio->port_config;
port_config &= ~GPIO_PSC3_PORT_CONFIG_MASK;
port_config |= GPIO_PSC3_PORT_CONFIG;
gpio->port_config = port_config;
iounmap(gpio);
}
else
{
return(-1);
}
#ifdef SPI_USE_MCLK
/* PSC clock enable */
g_pCDM->clk_enables |= CDM_PSC3_MCLK_ENABLE;
g_pCDM->mclken_div_psc3 = CDM_PSC3_MCLK_CONFIG;
#endif /* SPI_USE_MCLK */
/* Disable rx and tx */
g_pPSC->command = MPC52xx_PSC_RST_RX;
g_pPSC->command = MPC52xx_PSC_RST_TX;
g_pPSC->command = MPC52xx_PSC_SEL_MODE_REG_1;
g_pPSC->command = MPC52xx_PSC_RST_ERR_STAT;
g_pPSC->command = MPC52xx_PSC_RX_DISABLE | MPC52xx_PSC_TX_DISABLE;
g_pPSC->mode = 0;
g_pPSC->sicr = PSC3_SICR_REG_VALUE;
#ifdef SPI_USE_MCLK
g_pPSC->ccr=0x0703; /* set SCK and DSCKL delay */
#else /* SPI_USE_MCLK */
g_pPSC->ccr=0x0003; /* set SCK and DSCKL delay must be > 2 */
#endif /* SPI_USE_MCLK */
g_pPSC->ctur=0x00; /* Set DTL delay 2us */
g_pPSC->ctlr=0x84;
g_pPSC->rfalarm=100; /* Alarm values taken from SPI example sample
*/
g_pPSC->tfalarm=1;
g_pPSC->rfcntl &= 0xf8; /* 0 byte granularity */
g_pPSC->tfcntl = 1;
/* Enable rx & tx */
g_pPSC->command = MPC52xx_PSC_RST_RX;
g_pPSC->command = MPC52xx_PSC_RST_TX;
g_pPSC->command = MPC52xx_PSC_SEL_MODE_REG_1;
g_pPSC->command = MPC52xx_PSC_RST_ERR_STAT;
g_pPSC->command = MPC52xx_PSC_RX_ENABLE | MPC52xx_PSC_TX_ENABLE;
---------------------------------------------------------------------------
Write code
---------------------------------------------------------------------------
static int mpc52xx_spi_transfer(u16 *p_usBuffer, u16 p_usCount)
{
u16 usIndex, usTemp;
printk("------------------------------------------------------\n");
printk("Entry: psc=%x status=%04x tfstat=%04x rfstat=%04x
mode=%02x\n tfnum %3d rfnum %3d\n",
(int)g_pPSC,g_pPSC->mpc52xx_psc_status,g_pPSC->tfstat,g_pPSC->tfstat,g_pPSC-
>mode,
g_pPSC->tfnum, g_pPSC->rfnum);
g_pPSC->command = MPC52xx_PSC_RST_RX;
g_pPSC->command = MPC52xx_PSC_RST_TX;
g_pPSC->command = MPC52xx_PSC_SEL_MODE_REG_1;
g_pPSC->command = MPC52xx_PSC_RST_ERR_STAT;
g_pPSC->command = MPC52xx_PSC_RX_ENABLE | MPC52xx_PSC_TX_ENABLE;
printk("TX-RX Enable: psc=%x status=%04x tfstat=%04x rfstat=%04x
mode=%02x\n tfnum %3d rfnum %3d\n",
(int)g_pPSC,g_pPSC->mpc52xx_psc_status,g_pPSC->tfstat,g_pPSC->tfstat,g_pPSC-
>mode,
g_pPSC->tfnum, g_pPSC->rfnum);
/* Clean out the read FIFO */
usIndex = 0;
while(g_pPSC->mpc52xx_psc_status & MPC52xx_PSC_SR_RXRDY)
{
usTemp = g_pPSC->mpc52xx_psc_buffer_16;
printk("Flushing Rx FIFO: psc=%x status=%04x tfstat=%04x rfstat=%04x
mode=%02x\n tfnum %3d rfnum %3d\n",
(int)g_pPSC,g_pPSC->mpc52xx_psc_status,g_pPSC->tfstat,g_pPSC->tfstat,g_pPSC-
>mode,
g_pPSC->tfnum, g_pPSC->rfnum);
udelay(100000);
udelay(100000);
udelay(100000);
udelay(100000);
udelay(100000);
usIndex++;
if(usIndex == 10) return(-1);
}
/* Send out the buffer */
g_pPSC->command = MPC52xx_PSC_RX_ENABLE | MPC52xx_PSC_TX_DISABLE;
for(usIndex=0; usIndex<p_usCount; usIndex++)
{
printk("Sending %04x: psc=%x status=%04x tfstat=%04x rfstat=%04x
mode=%02x\n tfnum %3d rfnum %3d\n",
p_usBuffer[usIndex],
(int)g_pPSC,g_pPSC->mpc52xx_psc_status,g_pPSC->tfstat,g_pPSC->tfstat,g_pPSC-
>mode,
g_pPSC->tfnum, g_pPSC->rfnum);
g_pPSC->mpc52xx_psc_buffer_16 = p_usBuffer[usIndex];
printk("Sent: psc=%x status=%04x tfstat=%04x rfstat=%04x
mode=%02x\n tfnum %3d rfnum %3d\n",
(int)g_pPSC,g_pPSC->mpc52xx_psc_status,g_pPSC->tfstat,g_pPSC->tfstat,g_pPSC-
>mode,
g_pPSC->tfnum, g_pPSC->rfnum);
}
g_pPSC->command = MPC52xx_PSC_RX_ENABLE | MPC52xx_PSC_TX_ENABLE;
usTemp = 0;
while(g_pPSC->tfnum)
{
printk("TFNUM Wait: psc=%x status=%04x tfstat=%04x rfstat=%04x
mode=%02x\n tfnum %3d rfnum %3d\n",
(int)g_pPSC,g_pPSC->mpc52xx_psc_status,g_pPSC->tfstat,g_pPSC->tfstat,g_pPSC-
>mode,
g_pPSC->tfnum, g_pPSC->rfnum);
udelay(100000);
udelay(100000);
udelay(100000);
udelay(100000);
udelay(100000);
usTemp++;
if(usTemp == 10) return(-1);
};
printk("TxRDY: psc=%x status=%04x tfstat=%04x rfstat=%04x
mode=%02x\n tfnum %3d rfnum %3d\n",
(int)g_pPSC,g_pPSC->mpc52xx_psc_status,g_pPSC->tfstat,g_pPSC->tfstat,g_pPSC-
>mode,
g_pPSC->tfnum, g_pPSC->rfnum);
for(usIndex=0; usIndex<p_usCount; usIndex++)
{
usTemp = 0;
while(!(g_pPSC->mpc52xx_psc_status & MPC52xx_PSC_SR_RXRDY))
{
printk("RxRDY Wait: psc=%x status=%04x tfstat=%04x rfstat=%04x
mode=%02x\n tfnum %3d rfnum %3d\n",
(int)g_pPSC,g_pPSC->mpc52xx_psc_status,g_pPSC->tfstat,g_pPSC->tfstat,g_pPSC-
>mode,
g_pPSC->tfnum, g_pPSC->rfnum);
udelay(100000);
udelay(100000);
udelay(100000);
udelay(100000);
udelay(100000);
usTemp++;
if(usTemp == 10) return(-1);
};
printk("RxRDY: psc=%x status=%04x tfstat=%04x rfstat=%04x
mode=%02x\n tfnum %3d rfnum %3d\n",
(int)g_pPSC,g_pPSC->mpc52xx_psc_status,g_pPSC->tfstat,g_pPSC->tfstat,g_pPSC-
>mode,
g_pPSC->tfnum, g_pPSC->rfnum);
p_usBuffer[usIndex] = g_pPSC->mpc52xx_psc_buffer_16;
printk(" Received %04x\n", p_usBuffer[usIndex]);
}
printk("EXIT: psc=%x status=%04x tfstat=%04x rfstat=%04x
mode=%02x\n tfnum %3d rfnum %3d\n",
(int)g_pPSC,g_pPSC->mpc52xx_psc_status,g_pPSC->tfstat,g_pPSC->tfstat,g_pPSC-
>mode,
g_pPSC->tfnum, g_pPSC->rfnum);
return(usIndex);
}
---------------------------------------------------------------------------
Output
---------------------------------------------------------------------------
The lines below are a capture of register settings from my driver,
along with output lines when trying to write 16 bit words to our
device. This output is consistent whether the device is connected
or not (via J21). Basic operation, delimited by "------...---":
- Disable TX, Enable RX (despite the "TX-RX Enable" heading)
- Send word 1
- Send word 2
- Enable TX, Enable RX
- Wait for tfnum == 0
- Receive data
port_config=91051624 sicr=0280f000 clk_enables=00ffffff div_psc3=800f
------------------------------------------------------
Entry: psc=f0002400 status=0400 tfstat=0003 rfstat=0003 mode=33
tfnum 0 rfnum 0
TX-RX Enable: psc=f0002400 status=0400 tfstat=0003 rfstat=0003 mode=33
tfnum 0 rfnum 0
Sending 0880: psc=f0002400 status=0400 tfstat=0003 rfstat=0003 mode=07
tfnum 0 rfnum 0
Sent: psc=f0002400 status=0000 tfstat=0002 rfstat=0002 mode=07
tfnum 2 rfnum 0
Sending bb00: psc=f0002400 status=0000 tfstat=0002 rfstat=0002 mode=07
tfnum 2 rfnum 0
Sent: psc=f0002400 status=0000 tfstat=0002 rfstat=0002 mode=07
tfnum 4 rfnum 0
TFNUM Wait: psc=f0002400 status=0000 tfstat=0002 rfstat=0002 mode=07
tfnum 2 rfnum 0
TxRDY: psc=f0002400 status=0500 tfstat=0003 rfstat=0003 mode=07
tfnum 0 rfnum 4
RxRDY: psc=f0002400 status=0500 tfstat=0003 rfstat=0003 mode=07
tfnum 0 rfnum 4
Received ffff
RxRDY: psc=f0002400 status=0500 tfstat=0003 rfstat=0003 mode=07
tfnum 0 rfnum 2
Received ffff
EXIT: psc=f0002400 status=0400 tfstat=0003 rfstat=0003 mode=07
tfnum 0 rfnum 0
------------------------------------------------------
Entry: psc=f0002400 status=0400 tfstat=0003 rfstat=0003 mode=07
tfnum 0 rfnum 0
TX-RX Enable: psc=f0002400 status=0400 tfstat=0003 rfstat=0003 mode=33
tfnum 0 rfnum 0
Sending 8820: psc=f0002400 status=0400 tfstat=0003 rfstat=0003 mode=07
tfnum 0 rfnum 0
Sent: psc=f0002400 status=0000 tfstat=0002 rfstat=0002 mode=07
tfnum 2 rfnum 0
Sending 0000: psc=f0002400 status=0000 tfstat=0002 rfstat=0002 mode=07
tfnum 2 rfnum 0
Sent: psc=f0002400 status=0000 tfstat=0002 rfstat=0002 mode=07
tfnum 4 rfnum 0
TFNUM Wait: psc=f0002400 status=0000 tfstat=0002 rfstat=0002 mode=07
tfnum 2 rfnum 0
TxRDY: psc=f0002400 status=0500 tfstat=0003 rfstat=0003 mode=07
tfnum 0 rfnum 4
RxRDY: psc=f0002400 status=0500 tfstat=0003 rfstat=0003 mode=07
tfnum 0 rfnum 4
Received ffff
RxRDY: psc=f0002400 status=0500 tfstat=0003 rfstat=0003 mode=07
tfnum 0 rfnum 2
Received ffff
EXIT: psc=f0002400 status=0400 tfstat=0003 rfstat=0003 mode=07
tfnum 0 rfnum 0
[-- Attachment #2: Type: text/html, Size: 20391 bytes --]
^ permalink raw reply
* Re: [PATCH 2/3] powerpc: Implement support for setting little-endian mode via prctl
From: Paul Mackerras @ 2006-06-07 21:41 UTC (permalink / raw)
To: Olof Johansson; +Cc: akpm, linuxppc-dev
In-Reply-To: <20060607173320.GB5661@pb15.lixom.net>
Olof Johansson writes:
> > #define CPU_FTR_LOCKLESS_TLBIE ASM_CONST(0x0)
> > #define CPU_FTR_MMCRA_SIHV ASM_CONST(0x0)
> > #define CPU_FTR_CI_LARGE_PAGE ASM_CONST(0x0)
> > +#define CPU_FTR_PAUSE_ZERO ASM_CONST(0x0)
> > #define CPU_FTR_PURR ASM_CONST(0x0)
> > #endif
>
> This seems to have snuck in from something else. It's not used anywhere.
Yes, early on I noticed that this one was missing from the dummy
definitions for 32-bit and cleaned it up as I went past. I'll remove
that hunk.
Paul.
^ permalink raw reply
* [PATCH 3/3] RTAS MSI
From: Jake Moilanen @ 2006-06-07 21:25 UTC (permalink / raw)
To: linuxppc-dev; +Cc: paulus
In-Reply-To: <20060607160212.1203d9ea.moilanen@austin.ibm.com>
This provides support for the pSeries RTAS interfaces for MSI.
It follows the altix conventions, and is based on top of the altix patch.
Signed-off-by: Jake Moilanen <moilanen@austin.ibm.com>
Index: 2.6/drivers/pci/Makefile
===================================================================
--- 2.6.orig/drivers/pci/Makefile 2006-06-07 15:29:55.000000000 -0500
+++ 2.6/drivers/pci/Makefile 2006-06-07 15:59:28.000000000 -0500
@@ -26,7 +26,14 @@
obj-$(CONFIG_PPC64) += setup-bus.o
obj-$(CONFIG_MIPS) += setup-bus.o setup-irq.o
obj-$(CONFIG_X86_VISWS) += setup-irq.o
-obj-$(CONFIG_PCI_MSI) += msi.o
+
+msiobj-$(CONFIG_X86) += msi.o msi-apic.o msi-intel.o
+msiobj-$(CONFIG_IA64) += msi.o msi-apic.o msi-intel.o
+msiobj-$(CONFIG_IA64_GENERIC) += msi.o msi-altix.o
+msiobj-$(CONFIG_IA64_SGI_SN2) += msi.o msi-altix.o
+msiobj-$(CONFIG_PPC_PSERIES) += msi-rtas.o
+
+obj-$(CONFIG_PCI_MSI) += $(msiobj-y)
#
# ACPI Related PCI FW Functions
Index: 2.6/drivers/pci/msi-rtas.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ 2.6/drivers/pci/msi-rtas.c 2006-06-07 15:59:59.000000000 -0500
@@ -0,0 +1,162 @@
+/*
+ * Jake Moilanen <moilanen@austin.ibm.com>
+ * Copyright (C) 2006 IBM
+ *
+ * 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 <linux/pci.h>
+#include <linux/irq.h>
+#include <asm/rtas.h>
+#include <asm/hw_irq.h>
+
+int rtas_enable_msi(struct pci_dev* pdev)
+{
+ static int seq_num = 1;
+ int i;
+ int rc;
+ int query_token = rtas_token("ibm,query-interrupt-source-number");
+ int devfn;
+ int busno;
+ u32 *reg;
+ int reglen;
+ int ret[3];
+ int dummy;
+ unsigned int virq;
+ unsigned int addr;
+ unsigned long buid = -1;
+ unsigned long wait_time;
+ struct device_node * dn;
+
+ BUG_ON(!pdev);
+
+ dn = pci_device_to_OF_node(pdev);
+
+ if (!of_find_property(dn, "ibm,req#msi", &dummy))
+ return -ENOENT;
+
+ reg = (u32 *) get_property(dn, "reg", ®len);
+ if (reg == NULL || reglen < 20)
+ return -ENXIO;
+
+ devfn = (reg[0] >> 8) & 0xff;
+ busno = (reg[0] >> 16) & 0xff;
+
+ buid = get_phb_buid(dn->parent);
+ addr = (busno << 16) | (devfn << 8);
+
+ while (1) {
+ rc = rtas_call(rtas_token("ibm,change-msi"), 6, 3, ret, addr,
+ buid >> 32, buid & 0xffffffff,
+ 0, 0, seq_num);
+
+ if (!rc)
+ break;
+ else if (rc == RTAS_BUSY)
+ udelay(1);
+ else if (rtas_is_extended_busy(rc)) {
+ wait_time = rtas_extended_busy_delay_time(rc);
+ udelay(wait_time * 1000);
+ } else {
+ printk(KERN_WARNING "error[%d]: getting the number of "
+ "MSI interrupts for %s\n", rc, dn->name);
+ return -EIO;
+ }
+
+ seq_num = ret[1];
+ }
+
+ /* Return if there's no MSI interrupts */
+ if (!ret[0])
+ return -ENOENT;
+
+ dn->n_intrs = ret[0];
+
+ dn->intrs = kmalloc(dn->n_intrs * sizeof(*(dn->intrs)), GFP_KERNEL);
+ if (!dn->intrs) {
+ printk(KERN_WARNING "rtas_enable_msi: can't allocate space\n");
+ return -ENOMEM;
+ }
+
+ for (i = 0; i < dn->n_intrs; i++) {
+ rc = rtas_call(query_token, 4, 3, ret, addr,
+ buid >> 32, buid & 0xffffffff, i);
+
+ if (!rc) {
+ virq = virt_irq_create_mapping(ret[0]);
+
+ dn->intrs[i].line = irq_offset_up(virq);
+ dn->intrs[i].sense = ret[1];
+ } else {
+ printk(KERN_WARNING "error[%d]: query-interrupt-source-number for %s\n",
+ rc, dn->name);
+ }
+ }
+
+ /* Just give the first vector out for now */
+ pdev->irq = dn->intrs[0].line;
+
+ return 0;
+}
+
+void rtas_disable_msi(struct pci_dev* pdev)
+{
+ static int seq_num = 1;
+ struct device_node * dn;
+ int rc;
+ int devfn;
+ int busno;
+ u32 *reg;
+ int reglen;
+ int ret[3];
+ int dummy;
+ unsigned int addr;
+ unsigned long buid = -1;
+ unsigned long wait_time;
+
+ BUG_ON(!pdev);
+
+ dn = pci_device_to_OF_node(pdev);
+
+ if (!of_find_property(dn, "ibm,req#msi", &dummy))
+ return;
+
+ reg = (u32 *) get_property(dn, "reg", ®len);
+ if (reg == NULL || reglen < 20)
+ return;
+
+ devfn = (reg[0] >> 8) & 0xff;
+ busno = (reg[0] >> 16) & 0xff;
+
+ buid = get_phb_buid(dn->parent);
+ addr = (busno << 16) | (devfn << 8);
+
+ while (1) {
+ rc = rtas_call(rtas_token("ibm,change-msi"), 6, 3, ret, addr,
+ buid >> 32, buid & 0xffffffff,
+ 2, 0, seq_num);
+
+ if (!rc)
+ break;
+ else if (rc == RTAS_BUSY)
+ udelay(1);
+ else if (rtas_is_extended_busy(rc)) {
+ wait_time = rtas_extended_busy_delay_time(rc);
+ udelay(wait_time * 1000);
+ } else {
+ printk(KERN_WARNING "error[%d]: setting the number of "
+ "MSI interrupts for %s\n", rc, dn->name);
+ return;
+ }
+
+ seq_num = ret[1];
+ }
+
+ dn->n_intrs = 0;
+
+ kfree(dn->intrs);
+}
Index: 2.6/drivers/pci/Kconfig
===================================================================
--- 2.6.orig/drivers/pci/Kconfig 2006-06-07 15:29:55.000000000 -0500
+++ 2.6/drivers/pci/Kconfig 2006-06-07 15:59:28.000000000 -0500
@@ -4,7 +4,7 @@
config PCI_MSI
bool "Message Signaled Interrupts (MSI and MSI-X)"
depends on PCI
- depends on (X86_LOCAL_APIC && X86_IO_APIC) || IA64
+ depends on (X86_LOCAL_APIC && X86_IO_APIC) || IA64 || PPC_PSERIES
help
This allows device drivers to enable MSI (Message Signaled
Interrupts). Message Signaled Interrupts enable a device to
Index: 2.6/arch/powerpc/platforms/pseries/setup.c
===================================================================
--- 2.6.orig/arch/powerpc/platforms/pseries/setup.c 2006-06-07 15:29:55.000000000 -0500
+++ 2.6/arch/powerpc/platforms/pseries/setup.c 2006-06-07 15:59:28.000000000 -0500
@@ -78,6 +78,8 @@
#endif
extern void find_udbg_vterm(void);
+extern int rtas_enable_msi(struct pci_dev* pdev);
+extern void rtas_disable_msi(struct pci_dev * pdev);
int fwnmi_active; /* TRUE if an FWNMI handler is present */
@@ -205,6 +207,10 @@
} else {
ppc_md.init_IRQ = xics_init_IRQ;
ppc_md.get_irq = xics_get_irq;
+#ifdef CONFIG_PCI_MSI
+ ppc_md.enable_msi = rtas_enable_msi;
+ ppc_md.disable_msi = rtas_disable_msi;
+#endif
}
#ifdef CONFIG_SMP
^ permalink raw reply
* [PATCH 2/3] MSI power abstraction
From: Jake Moilanen @ 2006-06-07 21:15 UTC (permalink / raw)
To: linuxppc-dev; +Cc: paulus
In-Reply-To: <20060607160212.1203d9ea.moilanen@austin.ibm.com>
Instead of trying to make PPC64 MSI fit in a Intel-centric MSI layer, a
simple short-term solution is to hook the pci_{en/dis}able_msi() calls
and make a machdep call.
The rest of the MSI functions are superfluous for what is needed at this
time. Many of which can have machdep calls added as needed.
Ben and Michael Ellerman are looking into rewrite the MSI layer to be
more generic. However, in the meantime this works as a interim
solution.
Signed-off-by: Jake Moilanen <moilanen@austin.ibm.com>
Index: 2.6/arch/powerpc/kernel/irq.c
===================================================================
--- 2.6.orig/arch/powerpc/kernel/irq.c 2006-06-07 15:23:41.000000000 -0500
+++ 2.6/arch/powerpc/kernel/irq.c 2006-06-07 15:29:32.000000000 -0500
@@ -47,6 +47,7 @@
#include <linux/cpumask.h>
#include <linux/profile.h>
#include <linux/bitops.h>
+#include <linux/pci.h>
#include <asm/uaccess.h>
#include <asm/system.h>
@@ -436,6 +437,30 @@
}
EXPORT_SYMBOL(do_softirq);
+#ifdef CONFIG_PCI_MSI
+int pci_enable_msi(struct pci_dev * pdev)
+{
+ if (ppc_md.enable_msi)
+ return ppc_md.enable_msi(pdev);
+ else
+ return -1;
+}
+
+void pci_disable_msi(struct pci_dev * pdev)
+{
+ if (ppc_md.disable_msi)
+ ppc_md.disable_msi(pdev);
+}
+
+void pci_scan_msi_device(struct pci_dev *dev) {}
+int pci_enable_msix(struct pci_dev* dev, struct msix_entry *entries, int nvec) {return -1;}
+void pci_disable_msix(struct pci_dev *dev) {}
+void msi_remove_pci_irq_vectors(struct pci_dev *dev) {}
+void disable_msi_mode(struct pci_dev *dev, int pos, int type) {}
+void pci_no_msi(void) {}
+
+#endif
+
#ifdef CONFIG_PPC64
static int __init setup_noirqdistrib(char *str)
{
Index: 2.6/include/asm-powerpc/machdep.h
===================================================================
--- 2.6.orig/include/asm-powerpc/machdep.h 2006-06-07 15:23:41.000000000 -0500
+++ 2.6/include/asm-powerpc/machdep.h 2006-06-07 15:24:48.000000000 -0500
@@ -238,6 +238,11 @@
*/
void (*machine_kexec)(struct kimage *image);
#endif /* CONFIG_KEXEC */
+
+#ifdef CONFIG_PCI_MSI
+ int (*enable_msi)(struct pci_dev *pdev);
+ void (*disable_msi)(struct pci_dev *pdev);
+#endif /* CONFIG_PCI_MSI */
};
extern void power4_idle(void);
^ permalink raw reply
* [PATCH 1/3] PCIe device_type pciex
From: Jake Moilanen @ 2006-06-07 21:05 UTC (permalink / raw)
To: linuxppc-dev; +Cc: paulus
In-Reply-To: <20060607160212.1203d9ea.moilanen@austin.ibm.com>
This adds support to recognize the PCIe device_type "pciex" and made
the portdrv buildable.
Signed-off-by: Jake Moilanen <moilanen@austin.ibm.com>
Index: 2.6/arch/powerpc/Kconfig
===================================================================
--- 2.6.orig/arch/powerpc/Kconfig 2006-05-31 15:33:57.000000000 -0500
+++ 2.6/arch/powerpc/Kconfig 2006-05-31 15:34:10.000000000 -0500
@@ -849,6 +849,8 @@
endchoice
+source "drivers/pci/pcie/Kconfig"
+
source "drivers/pci/Kconfig"
source "drivers/pcmcia/Kconfig"
Index: 2.6/arch/powerpc/kernel/pci_64.c
===================================================================
--- 2.6.orig/arch/powerpc/kernel/pci_64.c 2006-05-31 15:33:57.000000000 -0500
+++ 2.6/arch/powerpc/kernel/pci_64.c 2006-05-31 15:34:10.000000000 -0500
@@ -396,7 +396,7 @@
dev->current_state = 4; /* unknown power state */
- if (!strcmp(type, "pci")) {
+ if (!strcmp(type, "pci") || !strcmp(type, "pciex")) {
/* a PCI-PCI bridge */
dev->hdr_type = PCI_HEADER_TYPE_BRIDGE;
dev->rom_base_reg = PCI_ROM_ADDRESS1;
Index: 2.6/arch/powerpc/kernel/rtas_pci.c
===================================================================
--- 2.6.orig/arch/powerpc/kernel/rtas_pci.c 2006-05-31 15:33:57.000000000 -0500
+++ 2.6/arch/powerpc/kernel/rtas_pci.c 2006-05-31 15:34:10.000000000 -0500
@@ -313,7 +313,9 @@
for (node = of_get_next_child(root, NULL);
node != NULL;
node = of_get_next_child(root, node)) {
- if (node->type == NULL || strcmp(node->type, "pci") != 0)
+
+ if (node->type == NULL || (strcmp(node->type, "pci") != 0 &&
+ strcmp(node->type, "pciex") != 0))
continue;
phb = pcibios_alloc_controller(node);
^ permalink raw reply
* [PATCH 0/3] PPC64 PCIe support
From: Jake Moilanen @ 2006-06-07 21:02 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Paul Mackerras
Here are the three patches for PCIe/MSI on pSeries for 2.6.18.
Since MSI is a requirement for PCIe, I have put these in one batch.
This is enough to probe, find, configure, and run basic I/O to PCIe
enabled devices. However, these patches do not include support for
PCIe hotplug, nor multiple MSI vectors.
There is a supplemental patches which will be needed in the
future. Specifically adding a PCIe bit for
ibm,client-architecture-support. To my knowledge this bit has not been
defined yet.
^ permalink raw reply
* Re: [Alsa-devel] [RFC 11/12] snd-aoa: add Kconfig and Makefile
From: Takashi Iwai @ 2006-06-07 18:50 UTC (permalink / raw)
To: Johannes Berg; +Cc: linuxppc-dev, alsa-devel, netstar
In-Reply-To: <20060607130917.996988000@sipsolutions.net>
At Wed, 07 Jun 2006 15:09:20 +0200,
Johannes Berg wrote:
>
> This patch adds the simple Kconfig and Makefile files for aoa.
>
> --- /dev/null
> +++ b/sound/aoa/Kconfig
> @@ -0,0 +1,17 @@
> +menu "Apple Onboard Audio driver"
> + depends on SND != n && PPC
> +
> +config SND_AOA
> + tristate "Apple Onboard Audio driver"
> + depends on SOUND && SND_PCM && EXPERIMENTAL
Let's remove EXPERIMENTAL. Or keep snd-powermac untouched.
Takashi
^ permalink raw reply
* Re: [Alsa-devel] [RFC 05/12] snd-aoa: add i2sbus
From: Takashi Iwai @ 2006-06-07 18:44 UTC (permalink / raw)
To: Johannes Berg; +Cc: linuxppc-dev, alsa-devel, netstar
In-Reply-To: <20060607130913.414650000@sipsolutions.net>
At Wed, 07 Jun 2006 15:09:14 +0200,
Johannes Berg wrote:
>
> --- /dev/null
> +++ b/sound/aoa/soundbus/i2sbus/i2sbus-pcm.c
> +static int clock_and_divisors(int mclk, int sclk, int rate, int *out)
> +{
> + /* sclk must be derived from mclk! */
> + if (mclk % sclk)
> + return -1;
> + /* derive sclk register value */
> + if (i2s_sf_sclkdiv(mclk / sclk, out))
> + return -1;
> +
> + if (I2S_CLOCK_SPEED_18MHz % (rate * mclk) == 0) {
> + if (!i2s_sf_mclkdiv(I2S_CLOCK_SPEED_18MHz / rate / mclk, out)) {
I'd use "I2S_CLOCK_SPEED_18MHZ / (rate * mclk)"
> --- /dev/null
> +++ b/sound/aoa/soundbus/i2sbus/i2sbus-core.c
> +static void i2sbus_release_dev(struct device *dev)
> +{
> + struct i2sbus_dev *i2sdev;
> + int i;
> +
> + i2sdev = container_of(dev, struct i2sbus_dev, sound.ofdev.dev);
> +
> + if (i2sdev->intfregs) iounmap(i2sdev->intfregs);
> + if (i2sdev->out.dbdma) iounmap(i2sdev->out.dbdma);
> + if (i2sdev->in.dbdma) iounmap(i2sdev->in.dbdma);
> + for (i=0;i<3;i++)
> + if (i2sdev->allocated_resource[i])
> + release_resource(i2sdev->allocated_resource[i]);
release_resource() doesn't kfree the record returned from
request_mem_region(). ALSA has a helper function
release_and_free_resource() that also does NULL check and kfree:
for (i = 0; i < 3; i++)
release_and_free_resource(i2sdev->allocated_resource[i]);
> +/* FIXME: look at device node refcounting */
> +static int i2sbus_add_dev(struct macio_dev *macio,
> + struct i2sbus_control *control,
> + struct device_node *np)
> +{
(snip)
> + for (i=0;i<3;i++)
> + if (dev->allocated_resource[i])
> + release_resource(dev->allocated_resource[i]);
Ditto.
Takashi
^ permalink raw reply
* Re: [Alsa-devel] [RFC 00/12] snd-aoa: add snd-aoa
From: Takashi Iwai @ 2006-06-07 18:22 UTC (permalink / raw)
To: Johannes Berg; +Cc: linuxppc-dev, alsa-devel, netstar
In-Reply-To: <20060607130909.584205000@sipsolutions.net>
At Wed, 07 Jun 2006 15:09:09 +0200,
Johannes Berg wrote:
>
> The following patches would add snd-aoa to the Linux source tree. I'm
> posting them here now for some last round of review before I finally
> post them with a Signed-Off-By and Changelog for inclusion. As you
> previously asked about this, I don't think it makes sense to commit
> these patches one by one, but the first one removing layout-id support
> from snd-powermac might be worth singling out.
Yes, I'll apply the patch to snd-powermac separately.
> Please let me know either way so that I provide either one or two
> changelog entries.
Both for snd-aoa addition and for dropping layout-id support from
snd-powermac, please.
thanks,
Takashi
^ permalink raw reply
* Re: [Alsa-devel] [RFC 03/12] snd-aoa: add aoa core
From: Takashi Iwai @ 2006-06-07 18:13 UTC (permalink / raw)
To: Johannes Berg; +Cc: linuxppc-dev, alsa-devel, netstar
In-Reply-To: <20060607130911.997152000@sipsolutions.net>
At Wed, 07 Jun 2006 15:09:12 +0200,
Johannes Berg wrote:
>
> --- /dev/null
> +++ b/sound/aoa/core/snd-aoa-gpio-pmf.c
(snip)
> +void pmf_handle_notify_irq(void *data)
> +{
Missing static.
> --- /dev/null
> +++ b/sound/aoa/core/snd-aoa-gpio-feature.c
(snip)
> +static struct device_node *get_gpio(
> + char *name, char *altname, int *gpioptr, int *gpioactiveptr)
Unconventional style.
> +irqreturn_t ftr_handle_notify_irq(int xx, void *data, struct pt_regs *regs)
> +{
Missing static.
> +static int ftr_set_notify(struct gpio_runtime *rt,
> + enum notify_type type,
> + notify_func_t notify,
> + void *data)
(snip)
> + if (old && !notify) {
> + free_irq(irq, notif);
> + }
> + if (!old && notify) {
> + request_irq(irq, ftr_handle_notify_irq, 0, name, notif);
> + }
Remove braces. Any error check from request_irq()?
Takashi
^ permalink raw reply
* Re: [PATCH 2/3] powerpc: Implement support for setting little-endian mode via prctl
From: Olof Johansson @ 2006-06-07 17:33 UTC (permalink / raw)
To: Paul Mackerras; +Cc: akpm, linuxppc-dev
In-Reply-To: <17542.28368.426967.127506@cargo.ozlabs.ibm.com>
Hi,
On Wed, Jun 07, 2006 at 04:14:40PM +1000, Paul Mackerras wrote:
> @@ -136,6 +141,7 @@ #define CPU_FTR_COHERENT_ICACHE ASM_CON
> #define CPU_FTR_LOCKLESS_TLBIE ASM_CONST(0x0)
> #define CPU_FTR_MMCRA_SIHV ASM_CONST(0x0)
> #define CPU_FTR_CI_LARGE_PAGE ASM_CONST(0x0)
> +#define CPU_FTR_PAUSE_ZERO ASM_CONST(0x0)
> #define CPU_FTR_PURR ASM_CONST(0x0)
> #endif
This seems to have snuck in from something else. It's not used anywhere.
-Olof
^ permalink raw reply
* Re: CPM_UART should allocate DPRAM for SMCx parameter RAM on MPC82xx
From: Dan Malek @ 2006-06-07 16:34 UTC (permalink / raw)
To: Laurent Pinchart; +Cc: linuxppc-embedded
In-Reply-To: <200606071434.08905.laurent.pinchart@tbox.biz>
On Jun 7, 2006, at 8:34 AM, Laurent Pinchart wrote:
> I'm not sure how to fix the problem
They way this _used_ to work is the DPRAM memory allocator
knew the SMCs had allocated the lower 128 bytes of DPRAM and
it never would allocate this space to anyone else (and it should not
free it either). The constant #defined values for the SMC base
address would work just fine and could be assigned as part of
the SMC uart initialization. Due to the alignment restrictions and
no reason to relocate this space anywhere else, this still seems
to be the most efficient method.
-- Dan
^ permalink raw reply
* Re: [PATCH 0/5] Sizing zones and holes in an architecture independent manner V7
From: Mel Gorman @ 2006-06-07 16:25 UTC (permalink / raw)
To: Andi Kleen
Cc: Andrew Morton, davej, tony.luck, linux-mm, linux-kernel,
bob.picco, linuxppc-dev
In-Reply-To: <200606071720.22242.ak@suse.de>
On Wed, 7 Jun 2006, Andi Kleen wrote:
>
>> Ok, while true, I'm not sure how it affects performance. The only "real"
>> value affected by present_pages is the number of patches that are
>> allocated in batches to the per-cpu allocator.
>
> It affects the low/high water marks in the VM zone balancer.
>
ok, that's true. The watermarks would be higher if memmap and the kernel
image is not taken into account. Arguably, the same applies to bootmem
allocations. This hits all architectures *except* x86_64.
> Especially for the 16MB DMA zone it can make a difference if you
> account 4MB kernel in there or not.
>
I'm guessing it's a difficult-to-trigger problem or it would have been
reported for other arches. Assuming it can be triggered and that is what
was causing your problems, it's still worth fixing in the arch-independent
code rather than burying it in arch/somewhere, right?
--
Mel Gorman
Part-time Phd Student Linux Technology Center
University of Limerick IBM Dublin Software Lab
^ permalink raw reply
* Linux kernel 2.6 on IBM RS/6000 7025-F40
From: Christophe Simon @ 2006-06-07 15:30 UTC (permalink / raw)
To: linuxppc-dev
Hi there,
Did someone succeeded in compiling a running 2.6 kernel on an IBM RS/6000
7025-F40 (PReP arch) ? I have one of these machines, and it runs with a
2.4.22 kernel built using the instructions gathered on
http://www.solinno.co.uk/7043-140/
It seems that this machine is quite problematic.
I tried to compile my own kernel with a stock 2.6.16.19, and after that
2.6.7 patched with the files I found for the 2.6.7 (at
http://www.solinno.co.uk/7043-140/files/2.6.7/), but the system refuses to
boot with those twoo kernels (the machine reboots or freezes before writing
any piece of information on the console...).
The site seems not to move anymore, and I'd like to have a 2.6 kernel
running because of his better performances ans extended functionalities, and
I'd like not to be stalled on 2.4.22 kernel...
I crawled the web hours and hours (Google is my friend, but it didn't help
me...) and I didn't find anything...
Could someone help me !
Thanks a lot !
Christophe SIMON
_________________________________________________________________
Windows Live Messenger : venez tester la version bêta !
http://www.ideas.live.com/programpage.aspx?versionId=0eccd94b-eb48-497c-8e60-c6313f7ebb73
^ permalink raw reply
* Re: [RFC 07/12] snd-aoa: add tas codec
From: Johannes Berg @ 2006-06-07 15:42 UTC (permalink / raw)
To: alsa-devel; +Cc: linuxppc-dev, netstar
In-Reply-To: <20060607130914.735290000@sipsolutions.net>
[-- Attachment #1: Type: text/plain, Size: 643 bytes --]
> + /* older machines have no 'codec' node with a 'compatible'
> + * property that says 'tas3004', they just have a 'deq'
> + * node without any such property... */
> + if (strcmp(dev->name, "deq") == 0) {
> + u32 *addr;
> + printk(KERN_DEBUG PFX "found 'deq' node\n");
> + addr = (u32 *) get_property(dev, "i2c-address", NULL);
> + if (!addr)
> + continue;
> + /* now, if the address doesn't match any of the two
> + * that a tas3004 can have, we cannot handle this.
> + * I doubt it ever happens but hey. */
> + if (*addr != 0x34 && *addr != 0x35)
And I fixed the obvious bug here now.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 793 bytes --]
^ permalink raw reply
* Re: [PATCH 0/5] Sizing zones and holes in an architecture independent manner V7
From: Andi Kleen @ 2006-06-07 15:20 UTC (permalink / raw)
To: Mel Gorman
Cc: Andrew Morton, davej, tony.luck, linux-mm, linux-kernel,
bob.picco, linuxppc-dev
In-Reply-To: <Pine.LNX.4.64.0606071118230.20653@skynet.skynet.ie>
> Ok, while true, I'm not sure how it affects performance. The only "real"
> value affected by present_pages is the number of patches that are
> allocated in batches to the per-cpu allocator.
It affects the low/high water marks in the VM zone balancer.
Especially for the 16MB DMA zone it can make a difference if you
account 4MB kernel in there or not.
-Andi
^ permalink raw reply
* Re: [PATCH] dtc: add setting of physical boot cpu
From: Jon Loeliger @ 2006-06-07 14:49 UTC (permalink / raw)
To: Michael Neuling; +Cc: linuxppc-dev
In-Reply-To: <20060530223309.9AB7667B3E@ozlabs.org>
So, like, the other day Michael Neuling mumbled:
> dtc always sets the physical boot CPU to 0xfeedbeef. Add a -b option to
> set this. Also add warnings when using the wrong property with the
> wrong blob version.
>
> Signed-off-by: Michael Neuling <mikey@neuling.org>
Applied and pushed out to:
http://www.jdl.com/git_repos
Sorry for the hang time.
Thanks,
jdl
^ permalink raw reply
* Re: *** PROBABLY SPAM *** Re: CPM_UART should allocate DPRAM for SMCx parameter RAM on MPC82xx
From: Laurent Pinchart @ 2006-06-07 14:10 UTC (permalink / raw)
To: Vitaly Bordug; +Cc: linuxppc-embedded
In-Reply-To: <20060607174931.766eda5d@vitb.ru.mvista.com>
> As I said, SMC offsets relative to pram things are screwed for PQ2.
> That needs to be fixed. It is assumed, that for each SMC ready-for-use
> offset should be defined in pram resource (as for 8xx). There is no need to
> dpalloc/dpfree because the idea is that pram thing should be fixed to
> prevent confusion. So the odd offset for SMC devices in pq2_devices.c
> should be replaced with correct values (which should be
> dpram_start+PROFF_SMCx - have a look at 8xx as reference)
Ok. dpram[PROFF_SMCx_BASE] must still be set to the values returned by
platform_get_resource_byname(). Where should that be done ?
Laurent Pinchart
^ permalink raw reply
* Re: CPM_UART should allocate DPRAM for SMCx parameter RAM on MPC82xx
From: Vitaly Bordug @ 2006-06-07 13:49 UTC (permalink / raw)
To: Laurent Pinchart; +Cc: linuxppc-embedded
In-Reply-To: <200606071539.57394.laurent.pinchart@tbox.biz>
On Wed, 7 Jun 2006 15:39:57 +0200
Laurent Pinchart <laurent.pinchart@tbox.biz> wrote:
> > > the move to platform devices introduced a bug in the CPM_UART SMC driver.
> > >
> > > Unlike SCC and FCC, the SMC parameter ram is not at a fixed location. A
> > > pointer to the parameter ram is instead stored at PROFF_SMCx_BASE.
> > >
> > > The SMC platform device resources (in arch/ppc/syslib/pq2_devices.c)
> > > reserves the memory resource PROFF_SMCx_BASE - PROFF_SMCx_BASE+1. The CPM
> > > UART driver considers that value as the SMC parameter ram offset. It
> > > should instead allocate 64 bytes (on a 64 bytes boundary) of DPRAM for
> > > its parameter ram, and store the offset at PROFF_SMCx_BASE.
> > >
> > > I'm not sure how to fix the problem as it seems that the platform device
> > > support is not complete yet (cpm_uart_init_portdesc is still used to
> > > initialize the console). A possible workaround is to set the pram
> > > resource to 0x0000-0x003f and 0x0040-0x007f instead of 0x87fc-0x87fd and
> > > 0x88fc-0x88fd for SMC1 and SMC2. This will not work if
> > > cpm_uart_init_portdesc is not called.
> >
> > No, pdev support for cpm uart is complete and works for every board I have
> > handy, both 8xx and 82xx. 8xx use SMC stuff and are ok, so I suppose the
> > issue got inside because this is first case we head with combination of
> > pq2/smc.
> >
> > init_portedsc is called in compatibility mode only, when driver was
> > unable to locate platform device (early_uart_get_pdev call). The
> > offsets are definitely odd - we should count the proper values (as it
> > was done for 8xx - offset from immr where pram will be located that
> > is). So, pq2_devices should be fixed, as well as bsp code should
> > provide early_uart_get_pdev call (see 8272 as reference).
>
> From my understanding, SMC pram should be allocated, and its offset should be
> stored at PROFF_SMCx_BASE. pq2_devices returns the PRFF_SMCx_BASE resource,
> and the CPM UART driver should use cpm_dpalloc to allocate the parameter RAM.
> Is that right ? If so, where should I allocate memory (and where should I
> free it) in the CPM UART driver ?
>
As I said, SMC offsets relative to pram things are screwed for PQ2.
That needs to be fixed. It is assumed, that for each SMC ready-for-use offset should be defined in pram resource (as for 8xx). There is no need to dpalloc/dpfree because the idea is that pram thing should be fixed to prevent confusion. So the odd offset for SMC devices in pq2_devices.c should be replaced with correct values (which should be dpram_start+PROFF_SMCx - have a look at 8xx as reference)
--
Sincerely,
Vitaly
^ permalink raw reply
* Re: CPM_UART should allocate DPRAM for SMCx parameter RAM on MPC82xx
From: Laurent Pinchart @ 2006-06-07 13:39 UTC (permalink / raw)
To: Vitaly Bordug; +Cc: linuxppc-embedded
In-Reply-To: <20060607173107.53d0ef59@vitb.ru.mvista.com>
> > the move to platform devices introduced a bug in the CPM_UART SMC drive=
r.
> >
> > Unlike SCC and FCC, the SMC parameter ram is not at a fixed location. A
> > pointer to the parameter ram is instead stored at PROFF_SMCx_BASE.
> >
> > The SMC platform device resources (in arch/ppc/syslib/pq2_devices.c)
> > reserves the memory resource PROFF_SMCx_BASE - PROFF_SMCx_BASE+1. The C=
PM
> > UART driver considers that value as the SMC parameter ram offset. It
> > should instead allocate 64 bytes (on a 64 bytes boundary) of DPRAM for
> > its parameter ram, and store the offset at PROFF_SMCx_BASE.
> >
> > I'm not sure how to fix the problem as it seems that the platform device
> > support is not complete yet (cpm_uart_init_portdesc is still used to
> > initialize the console). A possible workaround is to set the pram
> > resource to 0x0000-0x003f and 0x0040-0x007f instead of 0x87fc-0x87fd and
> > 0x88fc-0x88fd for SMC1 and SMC2. This will not work if
> > cpm_uart_init_portdesc is not called.
>
> No, pdev support for cpm uart is complete and works for every board I have
> handy, both 8xx and 82xx. 8xx use SMC stuff and are ok, so I suppose the
> issue got inside because this is first case we head with combination of
> pq2/smc.
>
> init_portedsc is called in compatibility mode only, when driver was
> unable to locate platform device (early_uart_get_pdev call). The
> offsets are definitely odd - we should count the proper values (as it
> was done for 8xx - offset from immr where pram will be located that
> is). So, pq2_devices should be fixed, as well as bsp code should
> provide early_uart_get_pdev call (see 8272 as reference).
=46rom my understanding, SMC pram should be allocated, and its offset shoul=
d be=20
stored at PROFF_SMCx_BASE. pq2_devices returns the PRFF_SMCx_BASE resource,=
=20
and the CPM UART driver should use cpm_dpalloc to allocate the parameter RA=
M.=20
Is that right ? If so, where should I allocate memory (and where should I=20
free it) in the CPM UART driver ?
Laurent Pinchart
^ permalink raw reply
* Re: CPM_UART should allocate DPRAM for SMCx parameter RAM on MPC82xx
From: Vitaly Bordug @ 2006-06-07 13:31 UTC (permalink / raw)
To: Laurent Pinchart; +Cc: linuxppc-embedded
In-Reply-To: <200606071434.08905.laurent.pinchart@tbox.biz>
On Wed, 7 Jun 2006 14:34:08 +0200
Laurent Pinchart <laurent.pinchart@tbox.biz> wrote:
> Hi everybody,
>
> the move to platform devices introduced a bug in the CPM_UART SMC driver.
>
> Unlike SCC and FCC, the SMC parameter ram is not at a fixed location. A
> pointer to the parameter ram is instead stored at PROFF_SMCx_BASE.
>
> The SMC platform device resources (in arch/ppc/syslib/pq2_devices.c) reserves
> the memory resource PROFF_SMCx_BASE - PROFF_SMCx_BASE+1. The CPM UART driver
> considers that value as the SMC parameter ram offset. It should instead
> allocate 64 bytes (on a 64 bytes boundary) of DPRAM for its parameter ram,
> and store the offset at PROFF_SMCx_BASE.
>
> I'm not sure how to fix the problem as it seems that the platform device
> support is not complete yet (cpm_uart_init_portdesc is still used to
> initialize the console). A possible workaround is to set the pram resource to
> 0x0000-0x003f and 0x0040-0x007f instead of 0x87fc-0x87fd and 0x88fc-0x88fd
> for SMC1 and SMC2. This will not work if cpm_uart_init_portdesc is not
> called.
>
No, pdev support for cpm uart is complete and works for every board I have handy, both 8xx and 82xx.
8xx use SMC stuff and are ok, so I suppose the issue got inside because this is first case we head with combination of pq2/smc.
init_portedsc is called in compatibility mode only, when driver was
unable to locate platform device (early_uart_get_pdev call). The
offsets are definitely odd - we should count the proper values (as it
was done for 8xx - offset from immr where pram will be located that
is). So, pq2_devices should be fixed, as well as bsp code should
provide early_uart_get_pdev call (see 8272 as reference).
--
Sincerely,
Vitaly
^ permalink raw reply
* [RFC 08/12] snd-aoa: add toonie codec
From: Johannes Berg @ 2006-06-07 13:09 UTC (permalink / raw)
To: alsa-devel; +Cc: linuxppc-dev, netstar
In-Reply-To: <20060607130909.584205000@sipsolutions.net>
This adds support for the 'toonie' codec which is just a codec
without any mixer/volume control functionality and is used on
the mac mini.
--- /dev/null
+++ b/sound/aoa/codecs/snd-aoa-codec-toonie.c
@@ -0,0 +1,140 @@
+/*
+ * Apple Onboard Audio driver for Toonie codec
+ *
+ * Copyright 2006 Johannes Berg <johannes@sipsolutions.net>
+ *
+ * GPL v2, can be found in COPYING.
+ *
+ *
+ * This is a driver for the toonie codec chip. This chip is present
+ * on the Mac Mini and is nothing but a DAC.
+ */
+#include <linux/delay.h>
+#include <linux/module.h>
+MODULE_AUTHOR("Johannes Berg <johannes@sipsolutions.net>");
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("toonie codec driver for snd-aoa");
+
+#include "../aoa.h"
+#include "../soundbus/soundbus.h"
+
+
+#define PFX "snd-aoa-codec-toonie: "
+
+struct toonie {
+ struct aoa_codec codec;
+};
+#define codec_to_toonie(c) container_of(c, struct toonie, codec)
+
+static int toonie_dev_register(struct snd_device *dev)
+{
+ return 0;
+}
+
+static struct snd_device_ops ops = {
+ .dev_register = toonie_dev_register,
+};
+
+static struct transfer_info toonie_transfers[] = {
+ /* This thing *only* has analog output,
+ * the rates are taken from Info.plist
+ * from Darwin. */
+ {
+ .formats = SNDRV_PCM_FMTBIT_S16_BE |
+ SNDRV_PCM_FMTBIT_S24_BE,
+ .rates = SNDRV_PCM_RATE_32000 |
+ SNDRV_PCM_RATE_44100 |
+ SNDRV_PCM_RATE_48000 |
+ SNDRV_PCM_RATE_88200 |
+ SNDRV_PCM_RATE_96000,
+ },
+ {}
+};
+
+#ifdef CONFIG_PM
+static int toonie_suspend(struct codec_info_item *cii, pm_message_t state)
+{
+ /* can we turn it off somehow? */
+ return 0;
+}
+
+static int toonie_resume(struct codec_info_item *cii)
+{
+ return 0;
+}
+#endif /* CONFIG_PM */
+
+static struct codec_info toonie_codec_info = {
+ .transfers = toonie_transfers,
+ .sysclock_factor = 256,
+ .bus_factor = 64,
+ .owner = THIS_MODULE,
+#ifdef CONFIG_PM
+ .suspend = toonie_suspend,
+ .resume = toonie_resume,
+#endif
+};
+
+static int toonie_init_codec(struct aoa_codec *codec)
+{
+ struct toonie *toonie = codec_to_toonie(codec);
+
+ if (aoa_snd_device_new(SNDRV_DEV_LOWLEVEL, toonie, &ops)) {
+ printk(KERN_ERR PFX "failed to create toonie snd device!\n");
+ return -ENODEV;
+ }
+
+ /* nothing connected? what a joke! */
+ if (toonie->codec.connected != 1)
+ return -ENOTCONN;
+
+ if (toonie->codec.soundbus_dev->attach_codec(toonie->codec.soundbus_dev,
+ aoa_get_card(),
+ &toonie_codec_info, toonie)) {
+ printk(KERN_ERR PFX "error creating toonie pcm\n");
+ return -ENODEV;
+ }
+
+ return 0;
+}
+
+static void toonie_exit_codec(struct aoa_codec *codec)
+{
+ struct toonie *toonie = codec_to_toonie(codec);
+
+ if (!toonie->codec.soundbus_dev) {
+ printk(KERN_ERR PFX "toonie_exit_codec called without soundbus_dev!\n");
+ return;
+ }
+ toonie->codec.soundbus_dev->detach_codec(toonie->codec.soundbus_dev, toonie);
+}
+
+static struct toonie *toonie;
+
+static int __init toonie_init(void)
+{
+ toonie = kzalloc(sizeof(struct toonie), GFP_KERNEL);
+
+ if (!toonie)
+ return -ENOMEM;
+
+ strlcpy(toonie->codec.name, "toonie", sizeof(toonie->codec.name));
+ toonie->codec.owner = THIS_MODULE;
+ toonie->codec.init = toonie_init_codec;
+ toonie->codec.exit = toonie_exit_codec;
+
+ if (aoa_codec_register(&toonie->codec)) {
+ kfree(toonie);
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
+static void __exit toonie_exit(void)
+{
+ kfree(toonie);
+}
+
+module_init(toonie_init);
+module_exit(toonie_exit);
--
^ permalink raw reply
* [RFC 11/12] snd-aoa: add Kconfig and Makefile
From: Johannes Berg @ 2006-06-07 13:09 UTC (permalink / raw)
To: alsa-devel; +Cc: linuxppc-dev, netstar
In-Reply-To: <20060607130909.584205000@sipsolutions.net>
This patch adds the simple Kconfig and Makefile files for aoa.
--- /dev/null
+++ b/sound/aoa/Kconfig
@@ -0,0 +1,17 @@
+menu "Apple Onboard Audio driver"
+ depends on SND != n && PPC
+
+config SND_AOA
+ tristate "Apple Onboard Audio driver"
+ depends on SOUND && SND_PCM && EXPERIMENTAL
+ ---help---
+ This option enables the new driver for the various
+ Apple Onboard Audio components.
+
+source "sound/aoa/fabrics/Kconfig"
+
+source "sound/aoa/codecs/Kconfig"
+
+source "sound/aoa/soundbus/Kconfig"
+
+endmenu
--- /dev/null
+++ b/sound/aoa/Makefile
@@ -0,0 +1,4 @@
+obj-$(CONFIG_SND_AOA) += core/
+obj-$(CONFIG_SND_AOA) += codecs/
+obj-$(CONFIG_SND_AOA) += fabrics/
+obj-$(CONFIG_SND_AOA_SOUNDBUS) += soundbus/
--
^ 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