Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

patch pxa2x0's com and lcd



Hi! all,


I think more necessary two patches.

The pxa2x0_com don't configure clkman. That is pxa not provide clock
to com modules. Other pxa devices configures clock in pxaXXX_attach().
We have configure com clock for console only in BOARD_machdep.c.

Index: pxa2x0_com.c
===================================================================
RCS file: /cvsroot/src/sys/arch/arm/xscale/pxa2x0_com.c,v
retrieving revision 1.11
diff -u -r1.11 pxa2x0_com.c
--- pxa2x0_com.c        4 Aug 2009 12:11:33 -0000       1.11
+++ pxa2x0_com.c        2 Dec 2009 12:57:42 -0000
@@ -143,6 +143,7 @@
        bus_space_tag_t iot;
        bus_space_handle_t ioh;
        bus_addr_t iobase;
+       int cken = 0;
 
        sc->sc_dev = self;
        iot = &pxa2x0_a4x_bs_tag;       /* XXX: This sucks */
@@ -157,6 +158,14 @@
        }
        COM_INIT_REGS(sc->sc_regs, iot, ioh, iobase);
 
+       switch (pxa->pxa_addr) {
+       case PXA2X0_FFUART_BASE: cken = CKEN_FFUART; break;
+       case PXA2X0_STUART_BASE: cken = CKEN_STUART; break;
+       case PXA2X0_BTUART_BASE: cken = CKEN_BTUART; break;
+       case PXA2X0_HWUART_BASE: cken = CKEN_HWUART; break;
+       }
+       pxa2x0_clkman_config(cken, 1);
+
        com_attach_subr(sc);
 
        pxa2x0_intr_establish(pxa->pxa_intr, IPL_SERIAL, comintr, sc);


Next, we require to disable LCD controller before call
pxa2x0_lcd_initialize().  It wait to LCSR_LDD(LCD disable done), if
LCCR0_ENB(enable). Our boot-loader don't clear this registers after
reboot.

Index: pxa2x0_lcd.c
===================================================================
RCS file: /cvsroot/src/sys/arch/arm/xscale/pxa2x0_lcd.c,v
retrieving revision 1.27
diff -u -r1.27 pxa2x0_lcd.c
--- pxa2x0_lcd.c        29 Jan 2009 12:28:15 -0000      1.27
+++ pxa2x0_lcd.c        2 Dec 2009 12:57:42 -0000
@@ -247,6 +247,9 @@
                return;
        }
 
+       /* First, disable LCD Controller */
+       bus_space_write_4(iot, ioh, LCDC_LCCR0, 0);
+
        pxa2x0_lcd_initialize(sc, geom);
 
        if (pxa2x0_lcd_console.is_console) {



I will commit first patch at weekend.
The second patch not schedule yet.  If you have any idea give me.  ;-)

Thanks,
--
kiyohara


Home | Main Index | Thread Index | Old Index