add chaos_calmer branch
[15.05/openwrt.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/drivers/block/Makefile
12 +++ b/drivers/block/Makefile
13 @@ -21,3 +21,4 @@ obj-$(CONFIG_IDE_SIL680) += sil680.o
14  obj-$(CONFIG_SANDBOX) += sandbox.o
15  obj-$(CONFIG_SCSI_SYM53C8XX) += sym53c8xx.o
16  obj-$(CONFIG_SYSTEMACE) += systemace.o
17 +obj-$(CONFIG_IDE_PLX) += plxsata_ide.o
18 --- a/drivers/usb/host/Makefile
19 +++ b/drivers/usb/host/Makefile
20 @@ -33,6 +33,7 @@ obj-$(CONFIG_USB_EHCI_MX6) += ehci-mx6.o
21  obj-$(CONFIG_USB_EHCI_OMAP) += ehci-omap.o
22  obj-$(CONFIG_USB_EHCI_PPC4XX) += ehci-ppc4xx.o
23  obj-$(CONFIG_USB_EHCI_MARVELL) += ehci-marvell.o
24 +obj-$(CONFIG_USB_EHCI_OXNAS) += ehci-oxnas.o
25  obj-$(CONFIG_USB_EHCI_PCI) += ehci-pci.o
26  obj-$(CONFIG_USB_EHCI_SPEAR) += ehci-spear.o
27  obj-$(CONFIG_USB_EHCI_SUNXI) += ehci-sunxi.o
28 --- a/tools/.gitignore
29 +++ b/tools/.gitignore
30 @@ -9,6 +9,7 @@
31  /mkenvimage
32  /mkimage
33  /mkexynosspl
34 +/mkox820crc
35  /mpc86x_clk
36  /mxsboot
37  /mksunxiboot
38 --- a/tools/Makefile
39 +++ b/tools/Makefile
40 @@ -143,6 +143,12 @@ hostprogs-$(CONFIG_KIRKWOOD) += kwboot
41  hostprogs-y += proftool
42  hostprogs-$(CONFIG_STATIC_RELA) += relocate-rela
43  
44 +
45 +hostprogs-$(CONFIG_OX820) += mkox820crc$(SFX)
46 +
47 +mkox820crc$(SFX)-objs := mkox820crc.o lib/crc32.o
48 +
49 +
50  # We build some files with extra pedantic flags to try to minimize things
51  # that won't build on some weird host compiler -- though there are lots of
52  # exceptions for files that aren't complaint.
53 --- a/drivers/serial/ns16550.c
54 +++ b/drivers/serial/ns16550.c
55 @@ -118,6 +118,14 @@ int ns16550_calc_divisor(NS16550_t port,
56         }
57         port->osc_12m_sel = 0;                  /* clear if previsouly set */
58  #endif
59 +#ifdef CONFIG_OX820
60 +       {
61 +               /* with additional 3 bit fractional */
62 +               u32 div = (CONFIG_SYS_NS16550_CLK + baudrate) / (baudrate * 2);
63 +               port->reg9 = (div & 7) << 5;
64 +               return (div >> 3);
65 +       }
66 +#endif
67  
68         return DIV_ROUND_CLOSEST(clock, mode_x_div * baudrate);
69  }
70 --- a/scripts/Makefile.spl
71 +++ b/scripts/Makefile.spl
72 @@ -202,6 +202,9 @@ OBJCOPYFLAGS_$(SPL_BIN).bin = $(SPL_OBJC
73  
74  $(obj)/$(SPL_BIN).bin: $(obj)/$(SPL_BIN) FORCE
75         $(call if_changed,objcopy)
76 +ifdef CONFIG_OX820
77 +       $(OBJTREE)/tools/mkox820crc $@
78 +endef
79  
80  LDFLAGS_$(SPL_BIN) += -T u-boot-spl.lds $(LDFLAGS_FINAL)
81  ifneq ($(CONFIG_SPL_TEXT_BASE),)
82 --- a/arch/arm/Kconfig
83 +++ b/arch/arm/Kconfig
84 @@ -488,6 +488,9 @@ config TARGET_BALLOON3
85  config TARGET_H2200
86         bool "Support h2200"
87  
88 +config TARGET_OX820
89 +       bool "Support ox820"
90 +
91  config TARGET_PALMLD
92         bool "Support palmld"
93  
94 @@ -650,6 +653,7 @@ source "board/logicpd/imx27lite/Kconfig"
95  source "board/logicpd/imx31_litekit/Kconfig"
96  source "board/mpl/vcma9/Kconfig"
97  source "board/olimex/mx23_olinuxino/Kconfig"
98 +source "board/ox820/Kconfig"
99  source "board/palmld/Kconfig"
100  source "board/palmtc/Kconfig"
101  source "board/palmtreo680/Kconfig"