Date: Sat, 17 May 2014 18:35:22 +0000 (UTC) From: Andrew Turner <andrew@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r266334 - in head/sys/arm: conf ti Message-ID: <201405171835.s4HIZM9M002167@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: andrew Date: Sat May 17 18:35:22 2014 New Revision: 266334 URL: http://svnweb.freebsd.org/changeset/base/266334 Log: Move the Ti SoCs to use the ARM platform. This should help allowing a single kernel to work on both PandaBoard and BeagleBone. Modified: head/sys/arm/conf/BEAGLEBONE head/sys/arm/conf/PANDABOARD head/sys/arm/ti/ti_machdep.c Modified: head/sys/arm/conf/BEAGLEBONE ============================================================================== --- head/sys/arm/conf/BEAGLEBONE Sat May 17 18:02:46 2014 (r266333) +++ head/sys/arm/conf/BEAGLEBONE Sat May 17 18:35:22 2014 (r266334) @@ -50,6 +50,7 @@ options SYSVSEM # SYSV-style semaphor options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev options PREEMPTION +options PLATFORM options FREEBSD_BOOT_LOADER options VFP # vfp/neon Modified: head/sys/arm/conf/PANDABOARD ============================================================================== --- head/sys/arm/conf/PANDABOARD Sat May 17 18:02:46 2014 (r266333) +++ head/sys/arm/conf/PANDABOARD Sat May 17 18:35:22 2014 (r266334) @@ -72,6 +72,7 @@ options KBD_INSTALL_CDEV # install a CD options FREEBSD_BOOT_LOADER options PREEMPTION +options PLATFORM # MMC/SD/SDIO Card slot support device mmc # mmc/sd bus Modified: head/sys/arm/ti/ti_machdep.c ============================================================================== --- head/sys/arm/ti/ti_machdep.c Sat May 17 18:02:46 2014 (r266333) +++ head/sys/arm/ti/ti_machdep.c Sat May 17 18:35:22 2014 (r266334) @@ -51,45 +51,40 @@ __FBSDID("$FreeBSD$"); #include <machine/bus.h> #include <machine/devmap.h> #include <machine/machdep.h> -#include <machine/platform.h> +#include <machine/platformvar.h> #include <arm/ti/omap4/omap4_reg.h> +#include "platform_if.h" + void (*ti_cpu_reset)(void) = NULL; -vm_offset_t -platform_lastaddr(void) +static vm_offset_t +ti_lastaddr(platform_t plat) { return (arm_devmap_lastaddr()); } -void -platform_probe_and_attach(void) -{ -} - -void -platform_gpio_init(void) -{ -} - -void -platform_late_init(void) -{ -} - /* * Construct static devmap entries to map out the most frequently used * peripherals using 1mb section mappings. */ -int -platform_devmap_init(void) -{ #if defined(SOC_OMAP4) +static int +ti_omap4_devmap_init(platform_t plat) +{ arm_devmap_add_entry(0x48000000, 0x01000000); /*16mb L4_PER devices */ arm_devmap_add_entry(0x4A000000, 0x01000000); /*16mb L4_CFG devices */ -#elif defined(SOC_TI_AM335X) + return (0); +} +#endif + +#if defined(SOC_TI_AM335X) +static int +ti_am335x_devmap_init(platform_t plat) +{ + arm_devmap_add_entry(0x44C00000, 0x00400000); /* 4mb L4_WKUP devices*/ arm_devmap_add_entry(0x47400000, 0x00100000); /* 1mb USB */ arm_devmap_add_entry(0x47800000, 0x00100000); /* 1mb mmchs2 */ @@ -97,11 +92,9 @@ platform_devmap_init(void) arm_devmap_add_entry(0x49000000, 0x00100000); /* 1mb edma3 */ arm_devmap_add_entry(0x49800000, 0x00300000); /* 3mb edma3 */ arm_devmap_add_entry(0x4A000000, 0x01000000); /*16mb L4_FAST devices*/ -#else -#error "Unknown SoC" -#endif return (0); } +#endif struct arm32_dma_range * bus_dma_get_range(void) @@ -127,3 +120,24 @@ cpu_reset() printf("Reset failed!\n"); while (1); } + +#if defined(SOC_OMAP4) +static platform_method_t omap4_methods[] = { + PLATFORMMETHOD(platform_devmap_init, ti_omap4_devmap_init), + PLATFORMMETHOD(platform_lastaddr, ti_lastaddr), + + PLATFORMMETHOD_END, +}; +FDT_PLATFORM_DEF(omap4, "omap4", 0, "ti,omap4430"); +#endif + +#if defined(SOC_TI_AM335X) +static platform_method_t am335x_methods[] = { + PLATFORMMETHOD(platform_devmap_init, ti_am335x_devmap_init), + PLATFORMMETHOD(platform_lastaddr, ti_lastaddr), + + PLATFORMMETHOD_END, +}; + +FDT_PLATFORM_DEF(am335x, "am335x", 0, "ti,am335x"); +#endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405171835.s4HIZM9M002167>