summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAlbert ARIBAUD <albert.u.boot@aribaud.net>2014-02-13 13:30:54 +0100
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2014-02-13 13:30:54 +0100
commitd53ccdb341cf16e32c0ca2d6099b194d9572fe0c (patch)
tree1ef7ca4c54463e02d0da5f6351ac5bebc5418c76 /drivers
parent7bc5c8c93032a7b86e268a172955e15b84f1aac3 (diff)
parente25bfecf7ba54a5b56cf991af8a2f2bb22994293 (diff)
downloadu-boot-imx-d53ccdb341cf16e32c0ca2d6099b194d9572fe0c.zip
u-boot-imx-d53ccdb341cf16e32c0ca2d6099b194d9572fe0c.tar.gz
u-boot-imx-d53ccdb341cf16e32c0ca2d6099b194d9572fe0c.tar.bz2
Merge branch 'u-boot-samsung/master' into 'u-boot-arm/master'
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpio/s5p_gpio.c15
-rw-r--r--drivers/power/battery/bat_trats2.c2
-rw-r--r--drivers/serial/serial_s5p.c4
-rw-r--r--drivers/video/exynos_fb.c28
-rw-r--r--drivers/video/exynos_fimd.c15
5 files changed, 20 insertions, 44 deletions
diff --git a/drivers/gpio/s5p_gpio.c b/drivers/gpio/s5p_gpio.c
index 7eeb96d..11a0472 100644
--- a/drivers/gpio/s5p_gpio.c
+++ b/drivers/gpio/s5p_gpio.c
@@ -9,6 +9,11 @@
#include <asm/io.h>
#include <asm/gpio.h>
+#define S5P_GPIO_GET_BANK(x) ((x >> S5P_GPIO_BANK_SHIFT) \
+ & S5P_GPIO_BANK_MASK)
+
+#define S5P_GPIO_GET_PIN(x) (x & S5P_GPIO_PIN_MASK)
+
#define CON_MASK(x) (0xf << ((x) << 2))
#define CON_SFR(x, v) ((v) << ((x) << 2))
@@ -124,17 +129,15 @@ void s5p_gpio_set_rate(struct s5p_gpio_bank *bank, int gpio, int mode)
struct s5p_gpio_bank *s5p_gpio_get_bank(unsigned gpio)
{
- int bank;
- unsigned g = gpio - s5p_gpio_part_max(gpio);
+ unsigned bank = S5P_GPIO_GET_BANK(gpio);
+ unsigned base = s5p_gpio_base(gpio);
- bank = g / GPIO_PER_BANK;
- bank *= sizeof(struct s5p_gpio_bank);
- return (struct s5p_gpio_bank *) (s5p_gpio_base(gpio) + bank);
+ return (struct s5p_gpio_bank *)(base + bank);
}
int s5p_gpio_get_pin(unsigned gpio)
{
- return gpio % GPIO_PER_BANK;
+ return S5P_GPIO_GET_PIN(gpio);
}
/* Common GPIO API */
diff --git a/drivers/power/battery/bat_trats2.c b/drivers/power/battery/bat_trats2.c
index f264832..94015aa 100644
--- a/drivers/power/battery/bat_trats2.c
+++ b/drivers/power/battery/bat_trats2.c
@@ -8,7 +8,7 @@
#include <common.h>
#include <power/pmic.h>
#include <power/battery.h>
-#include <power/max8997_pmic.h>
+#include <power/max77693_pmic.h>
#include <errno.h>
static struct battery battery_trats;
diff --git a/drivers/serial/serial_s5p.c b/drivers/serial/serial_s5p.c
index 89f5d68..98c62b4 100644
--- a/drivers/serial/serial_s5p.c
+++ b/drivers/serial/serial_s5p.c
@@ -100,8 +100,8 @@ static int serial_init_dev(const int dev_index)
{
struct s5p_uart *const uart = s5p_get_base_uart(dev_index);
- /* enable FIFOs */
- writel(0x1, &uart->ufcon);
+ /* enable FIFOs, auto clear Rx FIFO */
+ writel(0x3, &uart->ufcon);
writel(0, &uart->umcon);
/* 8N1 */
writel(0x3, &uart->ulcon);
diff --git a/drivers/video/exynos_fb.c b/drivers/video/exynos_fb.c
index 7d4c6e0..00a0a11 100644
--- a/drivers/video/exynos_fb.c
+++ b/drivers/video/exynos_fb.c
@@ -62,31 +62,6 @@ static void exynos_lcd_init(vidinfo_t *vid)
lcd_set_flush_dcache(1);
}
-#ifdef CONFIG_CMD_BMP
-static void draw_logo(void)
-{
- int x, y;
- ulong addr;
-
- if (panel_width >= panel_info.logo_width) {
- x = ((panel_width - panel_info.logo_width) >> 1);
- } else {
- x = 0;
- printf("Warning: image width is bigger than display width\n");
- }
-
- if (panel_height >= panel_info.logo_height) {
- y = ((panel_height - panel_info.logo_height) >> 1) - 4;
- } else {
- y = 0;
- printf("Warning: image height is bigger than display height\n");
- }
-
- addr = panel_info.logo_addr;
- bmp_display(addr, x, y);
-}
-#endif
-
void __exynos_cfg_lcd_gpio(void)
{
}
@@ -323,9 +298,6 @@ void lcd_enable(void)
if (panel_info.logo_on) {
memset((void *) gd->fb_base, 0, panel_width * panel_height *
(NBITS(panel_info.vl_bpix) >> 3));
-#ifdef CONFIG_CMD_BMP
- draw_logo();
-#endif
}
lcd_panel_on(&panel_info);
diff --git a/drivers/video/exynos_fimd.c b/drivers/video/exynos_fimd.c
index f962c4f..cebbba7 100644
--- a/drivers/video/exynos_fimd.c
+++ b/drivers/video/exynos_fimd.c
@@ -73,18 +73,19 @@ static void exynos_fimd_set_par(unsigned int win_id)
/* DATAPATH is DMA */
cfg |= EXYNOS_WINCON_DATAPATH_DMA;
- if (pvid->logo_on) /* To get proprietary LOGO */
- cfg |= EXYNOS_WINCON_WSWP_ENABLE;
- else /* To get output console on LCD */
- cfg |= EXYNOS_WINCON_HAWSWP_ENABLE;
+ cfg |= EXYNOS_WINCON_HAWSWP_ENABLE;
/* dma burst is 16 */
cfg |= EXYNOS_WINCON_BURSTLEN_16WORD;
- if (pvid->logo_on) /* To get proprietary LOGO */
- cfg |= EXYNOS_WINCON_BPPMODE_24BPP_888;
- else /* To get output console on LCD */
+ switch (pvid->vl_bpix) {
+ case 4:
cfg |= EXYNOS_WINCON_BPPMODE_16BPP_565;
+ break;
+ default:
+ cfg |= EXYNOS_WINCON_BPPMODE_24BPP_888;
+ break;
+ }
writel(cfg, (unsigned int)&fimd_ctrl->wincon0 +
EXYNOS_WINCON(win_id));