unstick r266334

Revision 266334

Date:
2014/05/17 18:35:22
Author:
andrew
Revision Log:
Move the Ti SoCs to use the ARM platform. This should help allowing a
single kernel to work on both PandaBoard and BeagleBone.
Files:

Legend:

 
Added
 
Removed
 
Modified
  • head/sys/arm/conf/BEAGLEBONE

     
    50 50 options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions
    51 51 options KBD_INSTALL_CDEV # install a CDEV entry in /dev
    52 52 options PREEMPTION
    53 options PLATFORM
    53 54 options FREEBSD_BOOT_LOADER
    54 55 options VFP # vfp/neon
    55 56
  • head/sys/arm/conf/PANDABOARD

     
    72 72 options FREEBSD_BOOT_LOADER
    73 73
    74 74 options PREEMPTION
    75 options PLATFORM
    75 76
    76 77 # MMC/SD/SDIO Card slot support
    77 78 device mmc # mmc/sd bus
  • head/sys/arm/ti/ti_machdep.c

     
    51 51 #include <machine/bus.h>
    52 52 #include <machine/devmap.h>
    53 53 #include <machine/machdep.h>
    54 #include <machine/platform.h>
    54 #include <machine/platformvar.h>
    55 55
    56 56 #include <arm/ti/omap4/omap4_reg.h>
    57 57
    58 #include "platform_if.h"
    59
    58 60 void (*ti_cpu_reset)(void) = NULL;
    59 61
    60 vm_offset_t
    61 platform_lastaddr(void)
    62 static vm_offset_t
    63 ti_lastaddr(platform_t plat)
    62 64 {
    63 65
    64 66 return (arm_devmap_lastaddr());
    65 67 }
    66 68
    67 void
    68 platform_probe_and_attach(void)
    69 {
    70 }
    71
    72 void
    73 platform_gpio_init(void)
    74 {
    75 }
    76
    77 void
    78 platform_late_init(void)
    79 {
    80 }
    81
    82 69 /*
    83 70 * Construct static devmap entries to map out the most frequently used
    84 71 * peripherals using 1mb section mappings.
    85 72 */
    86 int
    87 platform_devmap_init(void)
    73 #if defined(SOC_OMAP4)
    74 static int
    75 ti_omap4_devmap_init(platform_t plat)
    88 76 {
    89 #if defined(SOC_OMAP4)
    90 77 arm_devmap_add_entry(0x48000000, 0x01000000); /*16mb L4_PER devices */
    91 78 arm_devmap_add_entry(0x4A000000, 0x01000000); /*16mb L4_CFG devices */
    92 #elif defined(SOC_TI_AM335X)
    79 return (0);
    80 }
    81 #endif
    82
    83 #if defined(SOC_TI_AM335X)
    84 static int
    85 ti_am335x_devmap_init(platform_t plat)
    86 {
    87
    93 88 arm_devmap_add_entry(0x44C00000, 0x00400000); /* 4mb L4_WKUP devices*/
    94 89 arm_devmap_add_entry(0x47400000, 0x00100000); /* 1mb USB */
    95 90 arm_devmap_add_entry(0x47800000, 0x00100000); /* 1mb mmchs2 */
     
    97 92 arm_devmap_add_entry(0x49000000, 0x00100000); /* 1mb edma3 */
    98 93 arm_devmap_add_entry(0x49800000, 0x00300000); /* 3mb edma3 */
    99 94 arm_devmap_add_entry(0x4A000000, 0x01000000); /*16mb L4_FAST devices*/
    100 #else
    101 #error "Unknown SoC"
    102 #endif
    103 95 return (0);
    104 96 }
    97 #endif
    105 98
    106 99 struct arm32_dma_range *
    107 100 bus_dma_get_range(void)
     
    127 120 printf("Reset failed!\n");
    128 121 while (1);
    129 122 }
    123
    124 #if defined(SOC_OMAP4)
    125 static platform_method_t omap4_methods[] = {
    126 PLATFORMMETHOD(platform_devmap_init, ti_omap4_devmap_init),
    127 PLATFORMMETHOD(platform_lastaddr, ti_lastaddr),
    128
    129 PLATFORMMETHOD_END,
    130 };
    131 FDT_PLATFORM_DEF(omap4, "omap4", 0, "ti,omap4430");
    132 #endif
    133
    134 #if defined(SOC_TI_AM335X)
    135 static platform_method_t am335x_methods[] = {
    136 PLATFORMMETHOD(platform_devmap_init, ti_am335x_devmap_init),
    137 PLATFORMMETHOD(platform_lastaddr, ti_lastaddr),
    138
    139 PLATFORMMETHOD_END,
    140 };
    141
    142 FDT_PLATFORM_DEF(am335x, "am335x", 0, "ti,am335x");
    143 #endif