8xx: PQ SoC IRDA support
Subsystems (4)
PATCH 1/1 8xx: PQ SoC IRDA support
Adds support of IRDA transceiver residing on PowerQUICC processors and enabling such on mpc885ads reference board. The driver is implemented using of_device concept, hereby implies arch/powerpc support of the target.
---
arch/powerpc/Kconfig | 1 arch/powerpc/boot/dts/mpc885ads.dts | 10 arch/powerpc/platforms/8xx/mpc885ads_setup.c | 39 + arch/powerpc/sysdev/fsl_soc.c | 58 ++ drivers/net/irda/Kconfig | 4 drivers/net/irda/Makefile | 1 drivers/net/irda/m8xx-sir.c | 715 ++++++++++++++++++++++++++ include/asm-ppc/commproc.h | 67 ++ 8 files changed, 895 insertions(+), 0 deletions(-)
arch/powerpc/Kconfig +1 -0
@@ -605,6 +605,7 @@ endmenu config ISA_DMA_API bool default y + depends on !PPC_8xx menu "Bus options"
arch/powerpc/boot/dts/mpc885ads.dts +10 -0
@@ -178,6 +178,16 @@ interrupt-parent = <930>; phy-handle = <e8002>; }; + + scc@a20 { + device_type = "network"; + compatible = "fsl,irda"; + model = "SCC"; + device-id = <2>; + reg = <a20 18 3d00 80>; + interrupts = <1d 3>; + interrupt-parent = <930>; + }; }; }; };
arch/powerpc/platforms/8xx/mpc885ads_setup.c +39 -0
@@ -50,6 +50,7 @@ extern unsigned int mpc8xx_get_irq(void);static void init_smc1_uart_ioports (struct fs_uart_platform_info * fpi);static void init_smc2_uart_ioports (struct fs_uart_platform_info * fpi);static void init_scc3_ioports (struct fs_platform_info * ptr); +static void init_irda_ioports (void );void __init mpc885ads_board_setup (void ) {
@@ -115,6 +116,10 @@ void __init mpc885ads_board_setup(void)immr_unmap (io_port);#endif + +#ifdef CONFIG_8XX_SIR +init_irda_ioports (); +#endif }
@@ -322,6 +327,40 @@ void init_smc_ioports(struct fs_uart_platform_info *data) } } +static void init_irda_ioports () +{ +iop8xx_t *io_port; +cpm8xx_t *cp; +unsigned *bcsr_io; + + bcsr_io =ioremap (BCSR1 ,sizeof (unsigned long )); + +if (bcsr_io ==NULL ) { +printk (KERN_CRIT "Could not remap BCSR1\n" ); +return ; + } + +/* Enable the IRDA. */ +clrbits32 (bcsr_io,BCSR1_IRDAEN ); +iounmap (bcsr_io); + + io_port = (iop8xx_t *)immr_map (im_ioport); + cp = (cpm8xx_t *)immr_map (im_cpm); + +/* Configure port A pins. */ +setbits16 (&io_port->iop_papar,0x000c ); +clrbits16 (&io_port->iop_padir,0x000c ); + +/* Configure Serial Interface clock routing. +* First, clear all SCC bits to zero, then set the ones we want. +*/ +clrbits32 (&cp->cp_sicr,0x0000ff00 ); +setbits32 (&cp->cp_sicr,0x00001200 ); + +immr_unmap (io_port); +immr_unmap (cp); +} +int platform_device_skip (const char *model,int id) {#ifdef CONFIG_MPC8xx_SECOND_ETH_SCC3
arch/powerpc/sysdev/fsl_soc.c +58 -0
62 lines not on this page · raw message
drivers/net/irda/Kconfig +4 -0
@@ -17,6 +17,10 @@ config IRTTY_SIR If unsure, say Y. +config 8XX_SIR + tristate "mpc8xx SIR" + depends on 8xx && IRDA + comment "Dongle support" config DONGLE
drivers/net/irda/Makefile +1 -0
@@ -34,6 +34,7 @@ obj-$(CONFIG_EP7211_IR) += ep7211_ir.o obj-$(CONFIG_AU1000_FIR) += au1k_ir.o # New SIR drivers obj-$(CONFIG_IRTTY_SIR) += irtty-sir.o sir-dev.o +obj-$(CONFIG_8XX_SIR) += m8xx-sir.o # New dongles drivers for new SIR drivers obj-$(CONFIG_ESI_DONGLE) += esi-sir.o obj-$(CONFIG_TEKRAM_DONGLE) += tekram-sir.o
drivers/net/irda/m8xx-sir.c new file +715 -0
715 lines not on this page · raw message
include/asm-ppc/commproc.h +67 -0
73 lines not on this page · raw message
Quoted 19 lines
Adds support of IRDA transceiver residing on PowerQUICC processors and enabling such on mpc885ads reference board. The driver is implemented=20 using
of_deviceconcept, hereby impliesarch/powerpcsupport=20 of the target.
=20Signed-off-by Vitaly Bordug <[email protected]>arch/powerpc/boot/dts/mpc885ads.dts +3
-0@@ -178,6 +178,16 @@ interrupt-parent =3D <930>; phy-handle =3D <e8002>; }; + + scc@a20 { + device_type =3D "network";
arch/powerpc/boot/dts/mpc885ads.dts line 193
Quoted 10 lines
arch/powerpc/boot/dts/mpc885ads.dts +7
-0+ compatible =3D "fsl,irda"; + model =3D "SCC"; + device-id =3D <2>; + reg =3D <a20 18 3d00 80>; + interrupts =3D <1d 3>; + interrupt-parent =3D <930>; + }; }; }; };
Any chance we could get an update to the booting-without-of.txt for any of this?
Thanks,
jdl
Quoted 25 lines · On Tue, 8 May 2007 07:36:48 -0700 "Loeliger Jon-LOELIGER" <[email protected]>…
Quoted 25 lines
Adds support of IRDA transceiver residing on PowerQUICC processors and enabling such on mpc885ads reference board. The driver is implemented using
of_deviceconcept, hereby impliesarch/powerpcsupport of the target.Signed-off-by Vitaly Bordug <[email protected]>arch/powerpc/boot/dts/mpc885ads.dts +9
-0@@ -178,6 +178,16 @@ interrupt-parent = <930>; phy-handle = <e8002>; }; + + scc@a20 { + device_type = "network"; + compatible = "fsl,irda"; + model = "SCC"; + device-id = <2>; + reg = <a20 18 3d00 80>; + interrupts = <1d 3>; + interrupt-parent = <930>;
Quoted 9 lines
arch/powerpc/boot/dts/mpc885ads.dts line 193
Quoted 4 lines
arch/powerpc/boot/dts/mpc885ads.dts +1
-0+ }; }; }; };Any chance we could get an update to the booting-without-of.txt for any of this?
Yes of course. my note is that it makes sense once defines would settle down stuff that looks OK in docs might not look such in driver...
Signature · 2 lines
Sincerely, Vitaly