socsvn commit: r239777 - in soc2012/aleek/beaglexm-armv6/sys:
arm/conf arm/ti arm/ti/usb boot/fdt/dts
aleek at FreeBSD.org
aleek at FreeBSD.org
Wed Jul 25 22:59:37 UTC 2012
Author: aleek
Date: Wed Jul 25 22:59:34 2012
New Revision: 239777
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=239777
Log:
trying to fix the bug External Non-Linefetch Abort (S) in OMAP EHCI driver
Modified:
soc2012/aleek/beaglexm-armv6/sys/arm/conf/BEAGLEBOARD-XM
soc2012/aleek/beaglexm-armv6/sys/arm/ti/ti_gpio.c
soc2012/aleek/beaglexm-armv6/sys/arm/ti/ti_machdep.c
soc2012/aleek/beaglexm-armv6/sys/arm/ti/usb/omap_ehci.c
soc2012/aleek/beaglexm-armv6/sys/boot/fdt/dts/beagleboardxm.dts
Modified: soc2012/aleek/beaglexm-armv6/sys/arm/conf/BEAGLEBOARD-XM
==============================================================================
--- soc2012/aleek/beaglexm-armv6/sys/arm/conf/BEAGLEBOARD-XM Wed Jul 25 21:59:10 2012 (r239776)
+++ soc2012/aleek/beaglexm-armv6/sys/arm/conf/BEAGLEBOARD-XM Wed Jul 25 22:59:34 2012 (r239777)
@@ -48,7 +48,7 @@
options PREEMPTION
# Debugging
-makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols
+#makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols
#makeoptions WERROR="-Werror"
#makeoptions WERROR=""
options BREAK_TO_DEBUGGER
Modified: soc2012/aleek/beaglexm-armv6/sys/arm/ti/ti_gpio.c
==============================================================================
--- soc2012/aleek/beaglexm-armv6/sys/arm/ti/ti_gpio.c Wed Jul 25 21:59:10 2012 (r239776)
+++ soc2012/aleek/beaglexm-armv6/sys/arm/ti/ti_gpio.c Wed Jul 25 22:59:34 2012 (r239777)
@@ -207,6 +207,8 @@
/* The following describes the H/W revision of each of the GPIO banks */
uint32_t sc_revision[MAX_GPIO_BANKS];
+ char padding[512];
+
struct mtx sc_mtx;
};
@@ -446,7 +448,10 @@
return (EINVAL);
+ device_printf( sc->sc_dev, "locking mutex\n" );
+ device_printf( sc->sc_dev, "adres mutexa: %p\n", &sc->sc_mtx );
TI_GPIO_LOCK(sc);
+ device_printf( sc->sc_dev, "mutex locked!!\n" );
/* Sanity check the pin number is valid */
if ((bank > MAX_GPIO_BANKS) || (sc->sc_mem_res[bank] == NULL)) {
@@ -659,11 +664,15 @@
struct ti_gpio_softc *sc = device_get_softc(dev);
unsigned int i;
int err = 0;
+ memset( sc, 0, sizeof( struct ti_gpio_softc ) );
sc->sc_dev = dev;
+ device_printf(dev, "Inicjalizacja mutexa gpio\n");
TI_GPIO_LOCK_INIT(sc);
+ device_printf( dev, "Address do softc struct: %p\n", sc );
+
/* There are up to 6 different GPIO register sets located in different
* memory areas on the chip. The memory range should have been set for
Modified: soc2012/aleek/beaglexm-armv6/sys/arm/ti/ti_machdep.c
==============================================================================
--- soc2012/aleek/beaglexm-armv6/sys/arm/ti/ti_machdep.c Wed Jul 25 21:59:10 2012 (r239776)
+++ soc2012/aleek/beaglexm-armv6/sys/arm/ti/ti_machdep.c Wed Jul 25 22:59:34 2012 (r239777)
@@ -527,8 +527,8 @@
DOMAIN_CLIENT);
pmap_pa = kernel_l1pt.pv_pa;
- //arm_early_puts( "Dumping memory layout!\n" );
- //dump_l1pagetable( kernel_l1pt.pv_pa );
+ arm_early_puts( "Dumping memory layout!\n" );
+ dump_l1pagetable( kernel_l1pt.pv_pa );
setttb(kernel_l1pt.pv_pa);
cpu_tlb_flushID();
Modified: soc2012/aleek/beaglexm-armv6/sys/arm/ti/usb/omap_ehci.c
==============================================================================
--- soc2012/aleek/beaglexm-armv6/sys/arm/ti/usb/omap_ehci.c Wed Jul 25 21:59:10 2012 (r239776)
+++ soc2012/aleek/beaglexm-armv6/sys/arm/ti/usb/omap_ehci.c Wed Jul 25 22:59:34 2012 (r239777)
@@ -125,6 +125,7 @@
int port_mode[3];
int phy_reset[3];
int reset_gpio_pin[3];
+ struct mtx mtx;
};
static device_attach_t omap_ehci_attach;
@@ -787,6 +788,11 @@
int len, tuple_size;
int i;
+ memset( &isc->mtx, 0, sizeof( struct mtx) );
+
+ device_printf( dev, "%s:%d\n", __FUNCTION__, __LINE__ );
+
+ mtx_init(&isc->mtx, "habababa", "ti_ehci_testowy", MTX_DEF);
device_printf( dev, "%s:%d\n", __FUNCTION__, __LINE__ );
/* initialise some bus fields */
@@ -797,12 +803,17 @@
/* save the device */
isc->sc_dev = dev;
+ device_printf( dev, "%s:%d\n", __FUNCTION__, __LINE__ );
/* get all DMA memory */
if (usb_bus_mem_alloc_all(&sc->sc_bus, USB_GET_DMA_TAG(dev),
&ehci_iterate_hw_softc)) {
return (ENOMEM);
}
-
+ device_printf( dev, "%s:%d\n", __FUNCTION__, __LINE__ );
+ mtx_lock( &isc->mtx );
+ device_printf( dev, "%s:%d\n", __FUNCTION__, __LINE__ );
+ mtx_unlock( &isc->mtx );
+ device_printf( dev, "%s:%d\n", __FUNCTION__, __LINE__ );
/* When the EHCI driver is added to the tree it is expected that 3
* memory resources and 1 interrupt resource is assigned. The memory
* resources should be:
@@ -881,6 +892,7 @@
device_printf( dev, "%s:%d\n", __FUNCTION__, __LINE__ );
tuple_size = sizeof(pcell_t) * 3;
node = ofw_bus_get_node(dev);
+
len = OF_getprop(node, "phy-config", phyconf, sizeof(phyconf));
if (len > 0) {
if (len % tuple_size)
@@ -897,7 +909,7 @@
phyconf_ptr += 3;
}
}
-
+
device_printf( dev, "%s:%d\n", __FUNCTION__, __LINE__ );
/* Initialise the ECHI registers */
err = omap_ehci_init(isc);
Modified: soc2012/aleek/beaglexm-armv6/sys/boot/fdt/dts/beagleboardxm.dts
==============================================================================
--- soc2012/aleek/beaglexm-armv6/sys/boot/fdt/dts/beagleboardxm.dts Wed Jul 25 21:59:10 2012 (r239776)
+++ soc2012/aleek/beaglexm-armv6/sys/boot/fdt/dts/beagleboardxm.dts Wed Jul 25 22:59:34 2012 (r239777)
@@ -173,7 +173,7 @@
interrupts = < 12 13 14 15 >;
interrupt-parent = <&AINTC>;
};
-
+/*
mmchs at 4809c000 {
compatible = "ti,mmchs";
reg =<0x4809c000 0x1000 >;
@@ -181,7 +181,7 @@
interrupt-parent = <&AINTC>;
mmchs-device-id = <1>;
};
-
+*/
i2c0: i2c at 48070000 {
#address-cells = <1>;
More information about the svn-soc-all
mailing list