From fc3608513ba13506d1e977d77e26916882803dfb Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Thu, 9 Aug 2012 21:04:28 +0000 Subject: serial: CONSOLE macro is not used Signed-off-by: Michal Simek Acked-by: Mike Frysinger diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c index 0d6ad62..b10bab7 100644 --- a/drivers/serial/serial.c +++ b/drivers/serial/serial.c @@ -84,9 +84,6 @@ static NS16550_t serial_ports[4] = { }; #define PORT serial_ports[port-1] -#if defined(CONFIG_CONS_INDEX) -#define CONSOLE (serial_ports[CONFIG_CONS_INDEX-1]) -#endif #if defined(CONFIG_SERIAL_MULTI) -- cgit v0.10.2 From e46431e190a9d53bcd7fa4c600dc94e9dba5b1ef Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Wed, 11 Jul 2012 02:26:38 +0000 Subject: fdt: Include arch specific gpio.h instead of asm-generic/gpio.h Include arch specific gpio.h instead of asm-generic/gpio.h because several architectures (Microblaze, Blackfin, Nios2, OpenRISC) define gpio functions in header file. asm-generic/gpio.h can be included in arch specific gpio.h (For example: ARM) Signed-off-by: Michal Simek CC: Simon Glass Acked-by: Mike Frysinger Acked-by: Simon Glass diff --git a/lib/fdtdec.c b/lib/fdtdec.c index cc09e06..af17ac1 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -24,8 +24,7 @@ #include #include -/* we need the generic GPIO interface here */ -#include +#include DECLARE_GLOBAL_DATA_PTR; -- cgit v0.10.2 From 578f35a338ea45b425f734a7772a49ffd796c6bb Mon Sep 17 00:00:00 2001 From: Luka Perkov Date: Sun, 15 Jul 2012 06:29:38 +0000 Subject: tools: add kwboot binary to .gitignore file Signed-off-by: Luka Perkov Acked-by: Prafulla Wadaskar Acked-by: Mike Frysinger diff --git a/tools/.gitignore b/tools/.gitignore index 3557a75..3088f4d 100644 --- a/tools/.gitignore +++ b/tools/.gitignore @@ -2,6 +2,7 @@ /envcrc /gen_eth_addr /img2srec +/kwboot /mkenvimage /mkimage /mpc86x_clk -- cgit v0.10.2 From 7cb714a57837f1352d737ae07b56a5ce47c40431 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 2 Aug 2012 06:19:34 +0000 Subject: config: Always use GNU ld This patch makes sure that we always use the GNU ld. U-Boot uses certain construct e.g. OVERLAY which are not implemented in gold therefore it always needs GNU ld for linking. It works well if default linker in toolchain is GNU ld but in some cases we can have gold to be the default linker and also ship GNU ld but not as default in such cases its called $(PREFIX)ld.bfd, with this patch we make sure that if $(PREFIX)ld.bfd exists than we use that for our ld. This way it does not matter what the default ld is. Signed-off-by: Otavio Salvador Signed-off-by: Khem Raj Acked-by: Mike Frysinger diff --git a/config.mk b/config.mk index 3dcea6a..c3822a2 100644 --- a/config.mk +++ b/config.mk @@ -133,7 +133,11 @@ cc-version = $(shell $(SHELL) $(SRCTREE)/tools/gcc-version.sh $(CC)) # Include the make variables (CC, etc...) # AS = $(CROSS_COMPILE)as -LD = $(CROSS_COMPILE)ld + +# Always use GNU ld +LD = $(shell if $(CROSS_COMPILE)ld.bfd -v > /dev/null 2>&1; \ + then echo "$(CROSS_COMPILE)ld.bfd"; else echo "$(CROSS_COMPILE)ld"; fi;) + CC = $(CROSS_COMPILE)gcc CPP = $(CC) -E AR = $(CROSS_COMPILE)ar -- cgit v0.10.2 From 72739219a12bf02820d29a89cb2b7fdc4d0e840f Mon Sep 17 00:00:00 2001 From: Vikram Narayanan Date: Sat, 16 Jun 2012 07:16:17 +0000 Subject: tx25: Use generic gpio_* calls Instead of manipulating gpio registers directly, use the calls from the gpio library. Signed-off-by: Vikram Narayanan Acked-by: Stefano Babic Cc: John Rigby Cc: Fabio Estevam Acked-by: Fabio Estevam Acked-by: Stefano Babic diff --git a/board/karo/tx25/tx25.c b/board/karo/tx25/tx25.c index 2a29943..07fd98d 100644 --- a/board/karo/tx25/tx25.c +++ b/board/karo/tx25/tx25.c @@ -34,14 +34,13 @@ DECLARE_GLOBAL_DATA_PTR; #ifdef CONFIG_FEC_MXC +#define GPIO_FEC_RESET_B MXC_GPIO_PORT_TO_NUM(4, 7) +#define GPIO_FEC_ENABLE_B MXC_GPIO_PORT_TO_NUM(4, 9) void tx25_fec_init(void) { struct iomuxc_mux_ctl *muxctl; struct iomuxc_pad_ctl *padctl; - u32 val; u32 gpio_mux_mode = MX25_PIN_MUX_MODE(5); - struct gpio_regs *gpio4 = (struct gpio_regs *)IMX_GPIO4_BASE; - struct gpio_regs *gpio3 = (struct gpio_regs *)IMX_GPIO3_BASE; u32 saved_rdata0_mode, saved_rdata1_mode, saved_rx_dv_mode; debug("tx25_fec_init\n"); @@ -66,18 +65,15 @@ void tx25_fec_init(void) writel(0x0, &padctl->pad_d11); /* drop PHY power and assert reset (low) */ - val = readl(&gpio4->gpio_dr) & ~((1 << 7) | (1 << 9)); - writel(val, &gpio4->gpio_dr); - val = readl(&gpio4->gpio_dir) | (1 << 7) | (1 << 9); - writel(val, &gpio4->gpio_dir); + gpio_direction_output(GPIO_FEC_RESET_B, 0); + gpio_direction_output(GPIO_FEC_ENABLE_B, 0); mdelay(5); debug("resetting phy\n"); /* turn on PHY power leaving reset asserted */ - val = readl(&gpio4->gpio_dr) | 1 << 9; - writel(val, &gpio4->gpio_dr); + gpio_set_value(GPIO_FEC_ENABLE_B, 1); mdelay(10); @@ -107,19 +103,16 @@ void tx25_fec_init(void) /* * set each to 1 and make each an output */ - val = readl(&gpio3->gpio_dr) | (1 << 10) | (1 << 11) | (1 << 12); - writel(val, &gpio3->gpio_dr); - val = readl(&gpio3->gpio_dir) | (1 << 10) | (1 << 11) | (1 << 12); - writel(val, &gpio3->gpio_dir); + gpio_direction_output(MXC_GPIO_PORT_TO_NUM(3, 10), 1); + gpio_direction_output(MXC_GPIO_PORT_TO_NUM(3, 11), 1); + gpio_direction_output(MXC_GPIO_PORT_TO_NUM(3, 12), 1); mdelay(22); /* this value came from RedBoot */ /* * deassert PHY reset */ - val = readl(&gpio4->gpio_dr) | 1 << 7; - writel(val, &gpio4->gpio_dr); - writel(val, &gpio4->gpio_dr); + gpio_set_value(GPIO_FEC_RESET_B, 1); mdelay(5); -- cgit v0.10.2