add uboot-oxnas
[openwrt/staging/chunkeey.git] / package / boot / uboot-oxnas / patches / 300-oxnas-target.patch
1 --- a/arch/arm/include/asm/mach-types.h
2 +++ b/arch/arm/include/asm/mach-types.h
3 @@ -212,6 +212,7 @@ extern unsigned int __machine_arch_type;
4 #define MACH_TYPE_EDB9307A 1128
5 #define MACH_TYPE_OMAP_3430SDP 1138
6 #define MACH_TYPE_VSTMS 1140
7 +#define MACH_TYPE_OXNAS 1152
8 #define MACH_TYPE_MICRO9M 1169
9 #define MACH_TYPE_BUG 1179
10 #define MACH_TYPE_AT91SAM9263EK 1202
11 --- a/boards.cfg
12 +++ b/boards.cfg
13 @@ -57,6 +57,11 @@ Active arm arm1136 mx35
14 Active arm arm1136 mx35 - woodburn woodburn_sd woodburn_sd:IMX_CONFIG=board/woodburn/imximage.cfg -
15 Active arm arm1136 mx35 CarMediaLab - flea3 - Stefano Babic <sbabic@denx.de>
16 Active arm arm1136 mx35 freescale - mx35pdk - Stefano Babic <sbabic@denx.de>
17 +Active arm arm1136 nas782x - - ox820 - -
18 +Active arm arm1136 nas782x - nas782x ox820_sata ox820:BOOT_FROM_SATA -
19 +Active arm arm1136 nas782x - nas782x ox820_fat ox820:BOOT_FROM_SATA,BOOT_FROM_FAT
20 +Active arm arm1136 nas782x - nas782x ox820_ext4 ox820:BOOT_FROM_SATA,BOOT_FROM_EXT4 -
21 +Active arm arm1136 nas782x - nas782x ox820_nand ox820:BOOT_FROM_NAND -
22 Active arm arm1176 bcm2835 raspberrypi rpi_b rpi_b - Stephen Warren <swarren@wwwdotorg.org>
23 Active arm arm1176 tnetv107x ti tnetv107xevm tnetv107x_evm - Chan-Taek Park <c-park@ti.com>
24 Active arm arm720t - armltd integrator integratorap_cm720t integratorap:CM720T Linus Walleij <linus.walleij@linaro.org>
25 --- a/drivers/block/Makefile
26 +++ b/drivers/block/Makefile
27 @@ -21,3 +21,4 @@ obj-$(CONFIG_IDE_SIL680) += sil680.o
28 obj-$(CONFIG_SANDBOX) += sandbox.o
29 obj-$(CONFIG_SCSI_SYM53C8XX) += sym53c8xx.o
30 obj-$(CONFIG_SYSTEMACE) += systemace.o
31 +obj-$(CONFIG_IDE_PLX) += plxsata_ide.o
32 --- a/drivers/serial/serial_ns16550.c
33 +++ b/drivers/serial/serial_ns16550.c
34 @@ -135,6 +135,14 @@ static int calc_divisor (NS16550_t port)
35 }
36 #endif
37
38 +#ifdef CONFIG_OX820
39 + {
40 + /* with additional 3 bit fractional */
41 + u32 div = (CONFIG_SYS_NS16550_CLK + gd->baudrate) / (gd->baudrate * 2);
42 + port->reg9 = (div & 7) << 5;
43 + return (div >> 3);
44 + }
45 +#endif
46 #define MODE_X_DIV 16
47 /* Compute divisor value. Normally, we should simply return:
48 * CONFIG_SYS_NS16550_CLK) / MODE_X_DIV / gd->baudrate
49 --- a/drivers/usb/host/Makefile
50 +++ b/drivers/usb/host/Makefile
51 @@ -32,6 +32,7 @@ obj-$(CONFIG_USB_EHCI_MX6) += ehci-mx6.o
52 obj-$(CONFIG_USB_EHCI_OMAP) += ehci-omap.o
53 obj-$(CONFIG_USB_EHCI_PPC4XX) += ehci-ppc4xx.o
54 obj-$(CONFIG_USB_EHCI_MARVELL) += ehci-marvell.o
55 +obj-$(CONFIG_USB_EHCI_OXNAS) += ehci-oxnas.o
56 obj-$(CONFIG_USB_EHCI_PCI) += ehci-pci.o
57 obj-$(CONFIG_USB_EHCI_SPEAR) += ehci-spear.o
58 obj-$(CONFIG_USB_EHCI_TEGRA) += ehci-tegra.o
59 --- a/spl/Makefile
60 +++ b/spl/Makefile
61 @@ -207,8 +207,13 @@ cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS)
62
63 OBJCOPYFLAGS_$(SPL_BIN).bin = $(SPL_OBJCFLAGS) -O binary
64
65 +ifdef CONFIG_OX820
66 $(obj)/$(SPL_BIN).bin: $(obj)/$(SPL_BIN) FORCE
67 $(call if_changed,objcopy)
68 + $(OBJTREE)/tools/mkox820crc $@
69 +else
70 + $(call if_changed,objcopy)
71 +endef
72
73 LDFLAGS_$(SPL_BIN) += -T u-boot-spl.lds $(LDFLAGS_FINAL)
74 ifneq ($(CONFIG_SPL_TEXT_BASE),)
75 --- a/tools/.gitignore
76 +++ b/tools/.gitignore
77 @@ -7,6 +7,7 @@
78 /mkenvimage
79 /mkimage
80 /mkexynosspl
81 +/mkox820crc
82 /mpc86x_clk
83 /mxsboot
84 /ncb
85 --- a/tools/Makefile
86 +++ b/tools/Makefile
87 @@ -131,6 +131,12 @@ hostprogs-$(CONFIG_KIRKWOOD) += kwboot$(
88 hostprogs-y += proftool$(SFX)
89 hostprogs-$(CONFIG_STATIC_RELA) += relocate-rela$(SFX)
90
91 +
92 +hostprogs-$(CONFIG_OX820) += mkox820crc$(SFX)
93 +
94 +mkox820crc$(SFX)-objs := mkox820crc.o crc32.o
95 +
96 +
97 # We build some files with extra pedantic flags to try to minimize things
98 # that won't build on some weird host compiler -- though there are lots of
99 # exceptions for files that aren't complaint.