Skip to content
Permalink
Browse files

Add files provided by fischertechnik

  • Loading branch information...
ski7777 committed Nov 1, 2017
1 parent 183acb7 commit f0d47e92dcae75cbe0e7e43819bd1bbc6b01f787
Showing with 17,503 additions and 2,241 deletions.
  1. +4 −0 Makefile
  2. +0 −2 arch/.gitignore
  3. +11 −0 arch/arm/config.mk
  4. +6 −4 arch/arm/cpu/armv7/am33xx/Makefile
  5. +16 −18 arch/arm/cpu/armv7/am33xx/board.c
  6. +13 −5 arch/arm/cpu/armv7/am33xx/clock.c
  7. +31 −0 arch/arm/cpu/armv7/am33xx/clock_am33xx.c
  8. +16 −7 arch/arm/cpu/armv7/am33xx/clock_am43xx.c
  9. +26 −7 arch/arm/cpu/armv7/am33xx/ddr.c
  10. +188 −0 arch/arm/cpu/armv7/am33xx/emif4d5.c
  11. +0 −92 arch/arm/cpu/armv7/am33xx/mem.c
  12. +22 −0 arch/arm/cpu/armv7/exynos/power.c
  13. +7 −4 arch/arm/cpu/armv7/omap-common/Makefile
  14. +14 −3 arch/arm/cpu/armv7/omap-common/clocks-common.c
  15. +122 −56 arch/arm/cpu/armv7/omap-common/emif-common.c
  16. +27 −1 arch/arm/cpu/armv7/omap-common/hwinit-common.c
  17. +13 −0 arch/arm/cpu/armv7/omap-common/lowlevel_init.S
  18. +99 −6 arch/arm/cpu/armv7/omap-common/mem-common.c
  19. +230 −0 arch/arm/cpu/armv7/omap-common/pipe3-phy.c
  20. +36 −0 arch/arm/cpu/armv7/omap-common/pipe3-phy.h
  21. +75 −0 arch/arm/cpu/armv7/omap-common/sata.c
  22. +0 −1 arch/arm/cpu/armv7/omap3/Makefile
  23. +0 −151 arch/arm/cpu/armv7/omap3/mem.c
  24. +5 −0 arch/arm/cpu/armv7/omap4/sdram_elpida.c
  25. +86 −20 arch/arm/cpu/armv7/omap5/hw_data.c
  26. +11 −4 arch/arm/cpu/armv7/omap5/hwinit.c
  27. +23 −0 arch/arm/cpu/armv7/omap5/prcm-regs.c
  28. +158 −61 arch/arm/cpu/armv7/omap5/sdram.c
  29. +12 −0 arch/arm/dts/exynos5250.dtsi
  30. +1 −0 arch/arm/include/asm/arch
  31. +4 −4 arch/arm/include/asm/arch-am33xx/clock.h
  32. +3 −0 arch/arm/include/asm/arch-am33xx/clocks_am33xx.h
  33. +19 −58 arch/arm/include/asm/arch-am33xx/cpu.h
  34. +252 −0 arch/arm/include/asm/arch-am33xx/cpu_am335x.h
  35. +44 −28 arch/arm/include/asm/arch-am33xx/ddr_defs.h
  36. +0 −8 arch/arm/include/asm/arch-am33xx/hardware.h
  37. +3 −0 arch/arm/include/asm/arch-am33xx/hardware_am33xx.h
  38. +15 −0 arch/arm/include/asm/arch-am33xx/hardware_am43xx.h
  39. +3 −0 arch/arm/include/asm/arch-am33xx/hardware_ti814x.h
  40. +3 −0 arch/arm/include/asm/arch-am33xx/hardware_ti816x.h
  41. +0 −5 arch/arm/include/asm/arch-am33xx/mem.h
  42. +3 −1 arch/arm/include/asm/arch-am33xx/mux_am43xx.h
  43. +3 −0 arch/arm/include/asm/arch-am33xx/omap.h
  44. +0 −48 arch/arm/include/asm/arch-am33xx/omap_gpmc.h
  45. +19 −4 arch/arm/include/asm/arch-am33xx/spl.h
  46. +1 −0 arch/arm/include/asm/arch-am33xx/sys_proto.h
  47. +8 −0 arch/arm/include/asm/arch-exynos/cpu.h
  48. +5 −0 arch/arm/include/asm/arch-exynos/power.h
  49. +88 −0 arch/arm/include/asm/arch-exynos/xhci-exynos.h
  50. +6 −0 arch/arm/include/asm/arch-mx6/iomux.h
  51. +1 −53 arch/arm/include/asm/arch-omap3/cpu.h
  52. +10 −0 arch/arm/include/asm/arch-omap3/mem.h
  53. +0 −36 arch/arm/include/asm/arch-omap3/omap_gpmc.h
  54. +1 −0 arch/arm/include/asm/arch-omap3/sys_proto.h
  55. +2 −48 arch/arm/include/asm/arch-omap4/cpu.h
  56. +26 −0 arch/arm/include/asm/arch-omap4/hardware.h
  57. +62 −0 arch/arm/include/asm/arch-omap4/mem.h
  58. +0 −3 arch/arm/include/asm/arch-omap4/omap.h
  59. +1 −0 arch/arm/include/asm/arch-omap4/sys_proto.h
  60. +17 −0 arch/arm/include/asm/arch-omap5/clock.h
  61. +2 −48 arch/arm/include/asm/arch-omap5/cpu.h
  62. +26 −0 arch/arm/include/asm/arch-omap5/hardware.h
  63. +62 −0 arch/arm/include/asm/arch-omap5/mem.h
  64. +11 −32 arch/arm/include/asm/arch-omap5/mux_dra7xx.h
  65. +7 −5 arch/arm/include/asm/arch-omap5/omap.h
  66. +48 −0 arch/arm/include/asm/arch-omap5/sata.h
  67. +5 −1 arch/arm/include/asm/arch-omap5/spl.h
  68. +1 −0 arch/arm/include/asm/arch-omap5/sys_proto.h
  69. +1 −2 arch/arm/include/asm/arch-tegra/usb.h
  70. +2 −2 arch/arm/include/asm/ehci-omap.h
  71. +25 −2 arch/arm/include/asm/emif.h
  72. +30 −0 arch/arm/include/asm/omap_common.h
  73. +0 −71 arch/arm/include/asm/omap_gpmc.h
  74. +1 −0 arch/arm/include/asm/proc
  75. +5 −0 arch/arm/lib/board.c
  76. +0 −4 arch/blackfin/cpu/.gitignore
  77. +0 −1 arch/blackfin/lib/.gitignore
  78. +0 −1 arch/powerpc/cpu/mpc824x/.gitignore
  79. +3 −2 board/amcc/canyonlands/canyonlands.c
  80. +0 −1 board/avnet/fx12mm/.gitignore
  81. +0 −1 board/avnet/v5fx30teval/.gitignore
  82. +4 −3 board/balloon3/balloon3.c
  83. +33 −0 board/boundary/nitrogen6x/nitrogen6x.c
  84. +1 −1 board/compulab/cm_t35/cm_t35.c
  85. +4 −4 board/esd/apc405/apc405.c
  86. +4 −4 board/esd/pmc440/pmc440.c
  87. +1 −1 board/htkw/mcx/mcx.c
  88. +4 −3 board/icpdas/lp8x4x/lp8x4x.c
  89. +0 −4 board/isee/igep0033/board.c
  90. +0 −1 board/isee/igep00x0/igep00x0.c
  91. +38 −0 board/knobloch/TXT/Makefile
  92. +205 −0 board/knobloch/TXT/README
  93. +560 −0 board/knobloch/TXT/board.c
  94. +77 −0 board/knobloch/TXT/board.h
  95. +281 −0 board/knobloch/TXT/lcd.c
  96. +60 −0 board/knobloch/TXT/mux.c
  97. +170 −0 board/knobloch/TXT/mux_am335x.h
  98. +147 −0 board/knobloch/TXT/pinmux_board.h
  99. +117 −0 board/knobloch/TXT/u-boot.lds
  100. +3 −1 board/nvidia/common/board.c
  101. +0 −1 board/overo/overo.c
  102. +0 −4 board/phytec/pcm051/board.c
  103. +1 −0 board/samsung/common/Makefile
  104. +21 −0 board/samsung/common/thor.c
  105. +4 −0 board/samsung/dts/exynos5250-smdk5250.dts
  106. +8 −0 board/samsung/dts/exynos5250-snow.dts
  107. +0 −19 board/samsung/smdk5250/exynos5-dt.c
  108. +3 −2 board/samsung/trats/trats.c
  109. +0 −9 board/siemens/common/board.c
  110. +1 −1 board/siemens/common/factoryset.c
  111. +1 −5 board/siemens/dxr2/board.c
  112. +2 −7 board/siemens/pxm2/board.c
  113. +2 −7 board/siemens/rut/board.c
  114. +1 −1 board/technexion/twister/twister.c
  115. +1 −1 board/teejet/mt_ventoux/mt_ventoux.c
  116. +36 −17 board/ti/am335x/README
  117. +19 −33 board/ti/am335x/board.c
  118. +17 −14 board/ti/am335x/mux.c
  119. +1 −1 board/ti/am43xx/Makefile
  120. +368 −5 board/ti/am43xx/board.c
  121. +33 −0 board/ti/am43xx/board.h
  122. +107 −2 board/ti/am43xx/mux.c
  123. +1 −1 board/ti/beagle/beagle.c
  124. +30 −13 board/ti/dra7xx/evm.c
  125. +76 −48 board/ti/dra7xx/mux_data.h
  126. +79 −43 board/ti/omap5_uevm/evm.c
  127. +1 −1 board/ti/panda/panda.c
  128. +2 −7 board/ti/ti814x/evm.c
  129. +0 −17 board/ti/ti816x/evm.c
  130. +4 −3 board/toradex/colibri_pxa270/colibri_pxa270.c
  131. +4 −3 board/trizepsiv/conxs.c
  132. +4 −3 board/vpac270/vpac270.c
  133. +0 −1 board/xilinx/ml507/.gitignore
  134. +0 −1 board/xilinx/ppc405-generic/.gitignore
  135. +0 −1 board/xilinx/ppc440-generic/.gitignore
  136. +7 −2 boards.cfg
  137. +7 −0 common/Makefile
  138. +18 −12 common/cmd_dfu.c
  139. +416 −0 common/cmd_lcd.c
  140. +72 −0 common/cmd_thordown.c
  141. +23 −21 common/cmd_usb_mass_storage.c
  142. +11 −1 common/fdt_support.c
  143. +11 −8 common/main.c
  144. +1 −0 common/spl/Makefile
  145. +5 −0 common/spl/spl.c
  146. +112 −0 common/spl/spl_usb.c
  147. +37 −2 common/usb.c
  148. +0 −15 doc/DocBook/.gitignore
  149. +101 −0 doc/README.nand
  150. +1 −2 doc/README.omap3
  151. +12 −6 drivers/block/ahci.c
  152. +15 −3 drivers/dfu/dfu.c
  153. +1 −0 drivers/mtd/nand/Makefile
  154. +67 −38 arch/arm/cpu/armv7/am33xx/elm.c → drivers/mtd/nand/omap_elm.c
  155. +450 −509 drivers/mtd/nand/omap_gpmc.c
  156. +3 −1 drivers/mtd/spi/sf_internal.h
  157. +36 −0 drivers/mtd/spi/sf_ops.c
  158. +6 −0 drivers/mtd/spi/sf_probe.c
  159. +3 −3 drivers/net/cpsw.c
  160. +15 −0 drivers/power/palmas.c
  161. +29 −3 drivers/spi/ti_qspi.c
  162. +14 −0 drivers/usb/eth/smsc95xx.c
  163. +1 −0 drivers/usb/gadget/Makefile
  164. +4 −0 drivers/usb/gadget/ether.c
  165. +1,003 −0 drivers/usb/gadget/f_thor.c
  166. +124 −0 drivers/usb/gadget/f_thor.h
  167. +26 −12 drivers/usb/gadget/g_dnl.c
  168. +9 −5 drivers/usb/gadget/mv_udc.c
  169. +2 −1 drivers/usb/gadget/s3c_udc_otg_xfer_dma.c
  170. +5 −0 drivers/usb/host/Makefile
  171. +11 −0 drivers/usb/host/ehci-exynos.c
  172. +3 −9 drivers/usb/host/ehci-omap.c
  173. +1 −1 drivers/usb/host/ehci-tegra.c
  174. +0 −16 drivers/usb/host/ehci.h
  175. +2 −2 drivers/usb/host/ohci-hcd.c
  176. +4 −7 drivers/usb/host/ohci.h
  177. +327 −0 drivers/usb/host/xhci-exynos5.c
  178. +720 −0 drivers/usb/host/xhci-mem.c
  179. +158 −0 drivers/usb/host/xhci-omap.c
  180. +939 −0 drivers/usb/host/xhci-ring.c
  181. +1,030 −0 drivers/usb/host/xhci.c
  182. +1,255 −0 drivers/usb/host/xhci.h
  183. +1 −0 drivers/usb/phy/Makefile
  184. +261 −0 drivers/usb/phy/omap_usb_phy.c
  185. +0 −2 examples/api/.gitignore
  186. +0 −13 examples/standalone/.gitignore
  187. BIN examples/standalone/hello_world
  188. +40 −0 examples/standalone/hello_world.srec
  189. +0 −6 include/.gitignore
  190. +1 −0 include/asm
  191. +272 −0 include/autoconf.mk
  192. +61 −0 include/autoconf.mk.dep
  193. +16 −0 include/config.h
  194. +5 −0 include/config.mk
  195. +670 −0 include/configs/TXT_knobloch.h
  196. +142 −78 include/configs/am335x_evm.h
  197. +2 −1 include/configs/am3517_crane.h
  198. +2 −1 include/configs/am3517_evm.h
  199. +323 −87 include/configs/am43xx_evm.h
  200. +1 −2 include/configs/cm_t35.h
  201. +2 −2 include/configs/devkit8000.h
  202. +1 −2 include/configs/dig297.h
  203. +177 −2 include/configs/dra7xx_evm.h
  204. +0 −1 include/configs/dxr2.h
  205. +5 −2 include/configs/exynos5250-dt.h
  206. +3 −1 include/configs/igep0033.h
  207. +2 −1 include/configs/igep00x0.h
  208. +2 −2 include/configs/mcx.h
  209. +6 −0 include/configs/nitrogen6x.h
  210. +3 −3 include/configs/omap3_beagle.h
  211. +1 −0 include/configs/omap3_evm.h
  212. +1 −2 include/configs/omap3_evm_common.h
  213. +1 −0 include/configs/omap3_evm_quick_nand.h
  214. +1 −1 include/configs/omap3_logic.h
  215. +2 −2 include/configs/omap3_overo.h
  216. +1 −3 include/configs/omap3_pandora.h
  217. +1 −2 include/configs/omap3_zoom1.h
  218. +1 −1 include/configs/omap3_zoom2.h
  219. +1 −1 include/configs/omap4_common.h
  220. +18 −21 include/configs/omap5_common.h
  221. +35 −0 include/configs/omap5_uevm.h
  222. +0 −1 include/configs/pxm2.h
  223. +0 −1 include/configs/rut.h
  224. +3 −1 include/configs/siemens-am33x-common.h
  225. +2 −2 include/configs/tam3517-common.h
  226. +0 −1 include/configs/ti814x_evm.h
  227. +1 −0 include/configs/ti_am335x_common.h
  228. +82 −30 include/configs/ti_armv7_common.h
  229. +12 −2 include/configs/trats.h
  230. +2 −3 include/configs/tricorder.h
  231. +1 −1 include/cpsw.h
  232. +3 −0 include/dfu.h
  233. +2 −0 include/fdtdec.h
  234. +1 −3 include/g_dnl.h
  235. +7 −9 arch/arm/include/asm/arch-am33xx/elm.h → include/linux/mtd/omap_elm.h
  236. +97 −0 include/linux/mtd/omap_gpmc.h
  237. +188 −0 include/linux/usb/dwc3.h
  238. +140 −0 include/linux/usb/xhci-omap.h
  239. +2 −1 include/mtd/mtd-abi.h
  240. +6 −0 include/palmas.h
  241. +1 −0 include/power/tps65910.h
  242. +7 −0 include/spl.h
  243. +27 −0 include/thor.h
  244. +36 −3 include/usb.h
  245. +19 −0 include/usb_defs.h
  246. +5 −8 include/usb_mass_storage.h
  247. +2 −0 lib/fdtdec.c
  248. +0 −4 spl/.gitignore
  249. +9 −0 spl/Makefile
  250. BIN spl/u-boot-spl
  251. +32 −0 spl/u-boot-spl.lds
  252. +2,970 −0 spl/u-boot-spl.map
  253. +0 −3 test/vboot/.gitignore
  254. +0 −21 tools/.gitignore
  255. +0 −1 tools/buildman/.gitignore
  256. BIN tools/env/fw_printenv
  257. BIN tools/envcrc
  258. BIN tools/gen_eth_addr
  259. BIN tools/img2srec
  260. BIN tools/kernel-doc/docproc
  261. BIN tools/mkenvimage
  262. BIN tools/mkimage
  263. +43 −21 tools/omapimage.c
  264. +29 −2 tools/omapimage.h
  265. +0 −1 tools/patman/.gitignore
  266. BIN tools/proftool
@@ -358,8 +358,12 @@ else
PLATFORM_LIBGCC = -L $(USE_PRIVATE_LIBGCC) -lgcc
endif
else
ifneq ("$(ARCH_PLATFORM_LIBGCC)","")
PLATFORM_LIBGCC := -L $(shell dirname $(ARCH_PLATFORM_LIBGCC)) -lgcc
else
PLATFORM_LIBGCC := -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc
endif
endif
PLATFORM_LIBS += $(PLATFORM_LIBGCC)
export PLATFORM_LIBS

This file was deleted.

Oops, something went wrong.
@@ -19,6 +19,17 @@ LDFLAGS_FINAL += --gc-sections
PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections \
-fno-common -ffixed-r9 -msoft-float

#
# When we use a hardfp toolchain if there are both 'libgcc.a' (hardfp) and
# 'arm-linux-gnueabi/libgcc.a' (softfp) we need to use the latter. We
# cannot always build with a hardfp-only toolchain.
#
ARCH_PLATFORM_LIBGCC := $(shell \
X=`$(CC) -print-file-name=arm-linux-gnueabi/libgcc.a`; \
if [ -f $$X ]; then echo $$X ; \
else $(CC) -print-file-name=libgcc.a ; \
fi)

# Support generic board on ARM
__HAVE_ARCH_GENERIC_BOARD := y

@@ -18,12 +18,14 @@ endif

COBJS-$(CONFIG_TI816X) += clock_ti816x.o
COBJS += sys_info.o
COBJS += mem.o
COBJS += ddr.o
COBJS += emif4.o
COBJS += board.o
COBJS += mux.o
COBJS-$(CONFIG_NAND_OMAP_GPMC) += elm.o

ifeq ($(CONFIG_AM43XX),)
COBJS += ddr.o
COBJS += emif4.o
endif
COBJS-$(CONFIG_AM43XX) += emif4d5.o

SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
OBJS := $(addprefix $(obj),$(COBJS) $(COBJS-y) $(SOBJS))
@@ -137,7 +137,8 @@ int arch_misc_init(void)
return 0;
}

#if defined(CONFIG_SPL_BUILD) || defined(CONFIG_NOR_BOOT)
#if defined(CONFIG_SPL_BUILD) || defined(CONFIG_NOR_BOOT) || \
defined(CONFIG_QSPI_BOOT)
/*
* This function is the place to do per-board things such as ramp up the
* MPU clock frequency.
@@ -148,20 +149,8 @@ __weak void am33xx_spl_board_init(void)
do_setup_dpll(&dpll_mpu_regs, &dpll_mpu_opp100);
}

static void rtc32k_enable(void)
__weak void rtc32k_enable(void)
{
struct rtc_regs *rtc = (struct rtc_regs *)RTC_BASE;

/*
* Unlock the RTC's registers. For more details please see the
* RTC_SS section of the TRM. In order to unlock we need to
* write these specific values (keys) in this order.
*/
writel(0x83e70b13, &rtc->kick0r);
writel(0x95a4f1e0, &rtc->kick1r);

/* Enable the RTC 32K OSC by setting bits 3 and 6. */
writel((1 << 3) | (1 << 6), &rtc->osc);
}

static void uart_soft_reset(void)
@@ -195,6 +184,8 @@ static void watchdog_disable(void)
}
#endif

#if defined(CONFIG_SPL_BUILD) || defined(CONFIG_NOR_BOOT) || \
defined(CONFIG_QSPI_BOOT)
void s_init(void)
{
/*
@@ -213,26 +204,33 @@ void s_init(void)
#ifdef CONFIG_SPL_BUILD
save_omap_boot_params();
#endif
#if defined(CONFIG_SPL_BUILD) || defined(CONFIG_NOR_BOOT)
watchdog_disable();
timer_init();
set_uart_mux_conf();
setup_clocks_for_console();
uart_soft_reset();
#endif

#ifdef CONFIG_NOR_BOOT
gd->baudrate = CONFIG_BAUDRATE;
serial_init();
gd->have_console = 1;
#else
#elif defined(CONFIG_SPL_BUILD)
gd = &gdata;
preloader_console_init();
#endif
#if defined(CONFIG_SPL_BUILD) || defined(CONFIG_NOR_BOOT)

prcm_init();
set_mux_conf_regs();
/* Enable RTC32K clock */
rtc32k_enable();
sdram_init();
}
#endif

#ifndef CONFIG_SYS_DCACHE_OFF
void enable_caches(void)
{
/* Enable D-cache. I-cache is already enabled in start.S */
dcache_enable();
}
#endif
@@ -42,8 +42,8 @@ static inline void wait_for_lock(const struct dpll_regs *dpll_regs)
{
if (!wait_on_value(ST_DPLL_CLK_MASK, ST_DPLL_CLK_MASK,
(void *)dpll_regs->cm_idlest_dpll, LDELAY)) {
printf("DPLL locking failed for 0x%x\n",
dpll_regs->cm_clkmode_dpll);
printf("DPLL locking failed for 0x%x LDELAY %d\n",
dpll_regs->cm_clkmode_dpll, LDELAY);
hang();
}
}
@@ -101,13 +101,21 @@ void do_setup_dpll(const struct dpll_regs *dpll_regs,
static void setup_dplls(void)
{
const struct dpll_params *params;
do_setup_dpll(&dpll_core_regs, &dpll_core);
do_setup_dpll(&dpll_mpu_regs, &dpll_mpu);
do_setup_dpll(&dpll_per_regs, &dpll_per);

params = get_dpll_core_params();
do_setup_dpll(&dpll_core_regs, params);

params = get_dpll_mpu_params();
do_setup_dpll(&dpll_mpu_regs, params);

params = get_dpll_per_params();
do_setup_dpll(&dpll_per_regs, params);
writel(0x300, &cmwkup->clkdcoldodpllper);

params = get_dpll_ddr_params();
printf(">>> %s vor do_setup_dpll\n", __func__);
do_setup_dpll(&dpll_ddr_regs, params);
printf(">>> %s nach do_setup_dpll\n", __func__);
}

static inline void wait_for_clk_enable(u32 *clkctrl_addr)
@@ -62,6 +62,21 @@ const struct dpll_params dpll_core = {
const struct dpll_params dpll_per = {
960, OSC-1, 5, -1, -1, -1, -1};

const struct dpll_params *get_dpll_mpu_params(void)
{
return &dpll_mpu;
}

const struct dpll_params *get_dpll_core_params(void)
{
return &dpll_core;
}

const struct dpll_params *get_dpll_per_params(void)
{
return &dpll_per;
}

void setup_clocks_for_console(void)
{
clrsetbits_le32(&cmwkup->wkclkstctrl, CD_CLKCTRL_CLKTRCTRL_MASK,
@@ -144,3 +159,19 @@ void enable_basic_clocks(void)
/* Select the Master osc 24 MHZ as Timer2 clock source */
writel(0x1, &cmdpll->clktimer2clk);
}

void rtc32k_enable(void)
{
struct rtc_regs *rtc = (struct rtc_regs *)RTC_BASE;

/*
* Unlock the RTC's registers. For more details please see the
* RTC_SS section of the TRM. In order to unlock we need to
* write these specific values (keys) in this order.
*/
writel(0x83e70b13, &rtc->kick0r);
writel(0x95a4f1e0, &rtc->kick1r);

/* Enable the RTC 32K OSC by setting bits 3 and 6. */
writel((1 << 3) | (1 << 6), &rtc->osc);
}
@@ -18,6 +18,7 @@

struct cm_perpll *const cmper = (struct cm_perpll *)CM_PER;
struct cm_wkuppll *const cmwkup = (struct cm_wkuppll *)CM_WKUP;
struct cm_dpll *const cmdpll = (struct cm_dpll *)CM_DPLL;

const struct dpll_regs dpll_mpu_regs = {
.cm_clkmode_dpll = CM_WKUP + 0x560,
@@ -47,17 +48,13 @@ const struct dpll_regs dpll_ddr_regs = {
.cm_idlest_dpll = CM_WKUP + 0x5A4,
.cm_clksel_dpll = CM_WKUP + 0x5AC,
.cm_div_m2_dpll = CM_WKUP + 0x5B0,
.cm_div_m4_dpll = CM_WKUP + 0x5B8,
};

const struct dpll_params dpll_mpu = {
-1, -1, -1, -1, -1, -1, -1};
const struct dpll_params dpll_core = {
-1, -1, -1, -1, -1, -1, -1};
const struct dpll_params dpll_per = {
-1, -1, -1, -1, -1, -1, -1};

void setup_clocks_for_console(void)
{
u32 clkctrl, idlest = MODULE_CLKCTRL_IDLEST_DISABLED;

/* Do not add any spl_debug prints in this function */
clrsetbits_le32(&cmwkup->wkclkstctrl, CD_CLKCTRL_CLKTRCTRL_MASK,
CD_CLKCTRL_CLKTRCTRL_SW_WKUP <<
@@ -68,6 +65,13 @@ void setup_clocks_for_console(void)
MODULE_CLKCTRL_MODULEMODE_MASK,
MODULE_CLKCTRL_MODULEMODE_SW_EXPLICIT_EN <<
MODULE_CLKCTRL_MODULEMODE_SHIFT);

while ((idlest == MODULE_CLKCTRL_IDLEST_DISABLED) ||
(idlest == MODULE_CLKCTRL_IDLEST_TRANSITIONING)) {
clkctrl = readl(&cmwkup->wkup_uart0ctrl);
idlest = (clkctrl & MODULE_CLKCTRL_IDLEST_MASK) >>
MODULE_CLKCTRL_IDLEST_SHIFT;
}
}

void enable_basic_clocks(void)
@@ -100,11 +104,16 @@ void enable_basic_clocks(void)
&cmper->gpio2clkctrl,
&cmper->gpio3clkctrl,
&cmper->i2c1clkctrl,
&cmper->cpgmac0clkctrl,
&cmper->emiffwclkctrl,
&cmper->emifclkctrl,
&cmper->otfaemifclkctrl,
&cmper->qspiclkctrl,
0
};

do_enable_clocks(clk_domains, clk_modules_explicit_en, 1);

/* Select the Master osc clk as Timer2 clock source */
writel(0x1, &cmdpll->clktimer2clk);
}
@@ -41,6 +41,23 @@ static struct ddr_cmdtctrl *ioctrl_reg = {
*/
void config_sdram(const struct emif_regs *regs, int nr)
{
__maybe_unused u32 int_config;

/*
* Within the EMIF controller there is a register, often at
* offset 0x54 which has a field named 'PR_OLD_COUNT' that is
* used to determine when to move the the priority of the oldest
* command in the FIFO. The need to use a non default value
* here is often seen in multimedia situations when you start to
* see screen jitter, but other situations may also require
* changes here. We change from the default value to provide a
* better general example.
*/
if (regs->int_config)
int_config = regs->int_config;
else
int_config = 0x00FFFF10;

if (regs->zq_config) {
/*
* A value of 0x2800 for the REF CTRL will give us
@@ -54,6 +71,15 @@ void config_sdram(const struct emif_regs *regs, int nr)
writel(regs->ref_ctrl, &emif_reg[nr]->emif_sdram_ref_ctrl);
writel(regs->ref_ctrl, &emif_reg[nr]->emif_sdram_ref_ctrl_shdw);
}

#if defined(CONFIG_AM33XX) || defined(CONFIG_TI81XX)
/*
* The INT_CONFIG register on AM335x or PBBPR on TI81XX serves
* similar purposes to the L3_CONFIG register on OMAP4 and lower
* (or OCP_CONFIG on OMAP5 and higher).
*/
writel(int_config, &emif_reg[nr]->emif_l3_config);
#endif
writel(regs->ref_ctrl, &emif_reg[nr]->emif_sdram_ref_ctrl);
writel(regs->ref_ctrl, &emif_reg[nr]->emif_sdram_ref_ctrl_shdw);
writel(regs->sdram_config, &emif_reg[nr]->emif_sdram_config);
@@ -89,15 +115,12 @@ void config_ddr_phy(const struct emif_regs *regs, int nr)
void config_cmd_ctrl(const struct cmd_control *cmd, int nr)
{
writel(cmd->cmd0csratio, &ddr_cmd_reg[nr]->cm0csratio);
writel(cmd->cmd0dldiff, &ddr_cmd_reg[nr]->cm0dldiff);
writel(cmd->cmd0iclkout, &ddr_cmd_reg[nr]->cm0iclkout);

writel(cmd->cmd1csratio, &ddr_cmd_reg[nr]->cm1csratio);
writel(cmd->cmd1dldiff, &ddr_cmd_reg[nr]->cm1dldiff);
writel(cmd->cmd1iclkout, &ddr_cmd_reg[nr]->cm1iclkout);

writel(cmd->cmd2csratio, &ddr_cmd_reg[nr]->cm2csratio);
writel(cmd->cmd2dldiff, &ddr_cmd_reg[nr]->cm2dldiff);
writel(cmd->cmd2iclkout, &ddr_cmd_reg[nr]->cm2iclkout);
}

@@ -121,10 +144,6 @@ void config_ddr_data(const struct ddr_data *data, int nr)
&(ddr_data_reg[nr]+i)->dt0fwsratio0);
writel(data->datawrsratio0,
&(ddr_data_reg[nr]+i)->dt0wrsratio0);
writel(data->datauserank0delay,
&(ddr_data_reg[nr]+i)->dt0rdelays0);
writel(data->datadldiff0,
&(ddr_data_reg[nr]+i)->dt0dldiff0);
}
}

Oops, something went wrong.

0 comments on commit f0d47e9

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.