diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpio/kw_gpio.c | 4 | ||||
-rw-r--r-- | drivers/i2c/designware_i2c.c | 19 | ||||
-rw-r--r-- | drivers/i2c/tegra_i2c.c | 7 | ||||
-rw-r--r-- | drivers/input/tegra-kbc.c | 2 | ||||
-rw-r--r-- | drivers/mmc/bcm2835_sdhci.c | 1 | ||||
-rw-r--r-- | drivers/mmc/sdhci.c | 6 | ||||
-rw-r--r-- | drivers/mmc/tegra_mmc.c | 3 | ||||
-rw-r--r-- | drivers/mtd/cfi_flash.c | 50 | ||||
-rw-r--r-- | drivers/mtd/nand/omap_gpmc.c | 36 | ||||
-rw-r--r-- | drivers/net/davinci_emac.c | 1 | ||||
-rw-r--r-- | drivers/net/fec_mxc.c | 8 | ||||
-rw-r--r-- | drivers/net/phy/phy.c | 7 | ||||
-rw-r--r-- | drivers/pci/pci.c | 8 | ||||
-rw-r--r-- | drivers/serial/serial.c | 8 | ||||
-rw-r--r-- | drivers/serial/serial_sh.c | 4 | ||||
-rw-r--r-- | drivers/usb/host/ehci-hcd.c | 17 | ||||
-rw-r--r-- | drivers/video/cfb_console.c | 14 | ||||
-rw-r--r-- | drivers/video/exynos_fb.c | 32 | ||||
-rw-r--r-- | drivers/video/ipu_common.c | 2 | ||||
-rw-r--r-- | drivers/video/ipu_disp.c | 15 | ||||
-rw-r--r-- | drivers/video/mxc_ipuv3_fb.c | 2 |
21 files changed, 95 insertions, 151 deletions
diff --git a/drivers/gpio/kw_gpio.c b/drivers/gpio/kw_gpio.c index 4fca089..43b27e3 100644 --- a/drivers/gpio/kw_gpio.c +++ b/drivers/gpio/kw_gpio.c @@ -36,7 +36,7 @@ void __set_direction(unsigned pin, int input) u = readl(GPIO_IO_CONF(pin)); } -void __set_level(unsigned pin, int high) +static void __set_level(unsigned pin, int high) { u32 u; @@ -48,7 +48,7 @@ void __set_level(unsigned pin, int high) writel(u, GPIO_OUT(pin)); } -void __set_blinking(unsigned pin, int blink) +static void __set_blinking(unsigned pin, int blink) { u32 u; diff --git a/drivers/i2c/designware_i2c.c b/drivers/i2c/designware_i2c.c index c891ebd..e085a70 100644 --- a/drivers/i2c/designware_i2c.c +++ b/drivers/i2c/designware_i2c.c @@ -8,6 +8,7 @@ #include <common.h> #include <asm/io.h> #include "designware_i2c.h" +#include <i2c.h> #ifdef CONFIG_I2C_MULTI_BUS static unsigned int bus_initialized[CONFIG_SYS_I2C_BUS_MAX]; @@ -76,16 +77,20 @@ static void set_speed(int i2c_spd) * * Set the i2c speed. */ -int i2c_set_bus_speed(int speed) +int i2c_set_bus_speed(unsigned int speed) { + int i2c_spd; + if (speed >= I2C_MAX_SPEED) - set_speed(IC_SPEED_MODE_MAX); + i2c_spd = IC_SPEED_MODE_MAX; else if (speed >= I2C_FAST_SPEED) - set_speed(IC_SPEED_MODE_FAST); + i2c_spd = IC_SPEED_MODE_FAST; else - set_speed(IC_SPEED_MODE_STANDARD); + i2c_spd = IC_SPEED_MODE_STANDARD; - return 0; + set_speed(i2c_spd); + + return i2c_spd; } /* @@ -93,7 +98,7 @@ int i2c_set_bus_speed(int speed) * * Gets the i2c speed. */ -int i2c_get_bus_speed(void) +unsigned int i2c_get_bus_speed(void) { u32 cntl; @@ -429,7 +434,7 @@ int i2c_set_bus_num(unsigned int bus) return 0; } -int i2c_get_bus_num(void) +unsigned int i2c_get_bus_num(void) { return current_bus; } diff --git a/drivers/i2c/tegra_i2c.c b/drivers/i2c/tegra_i2c.c index 257b72f..562211e 100644 --- a/drivers/i2c/tegra_i2c.c +++ b/drivers/i2c/tegra_i2c.c @@ -471,8 +471,8 @@ static void tegra_i2c_init(struct i2c_adapter *adap, int speed, int slaveaddr) } /* i2c write version without the register address */ -int i2c_write_data(struct i2c_bus *bus, uchar chip, uchar *buffer, int len, - bool end_with_repeated_start) +static int i2c_write_data(struct i2c_bus *bus, uchar chip, uchar *buffer, + int len, bool end_with_repeated_start) { int rc; @@ -493,7 +493,8 @@ int i2c_write_data(struct i2c_bus *bus, uchar chip, uchar *buffer, int len, } /* i2c read version without the register address */ -int i2c_read_data(struct i2c_bus *bus, uchar chip, uchar *buffer, int len) +static int i2c_read_data(struct i2c_bus *bus, uchar chip, uchar *buffer, + int len) { int rc; diff --git a/drivers/input/tegra-kbc.c b/drivers/input/tegra-kbc.c index 7e36db0..0ef94f7 100644 --- a/drivers/input/tegra-kbc.c +++ b/drivers/input/tegra-kbc.c @@ -181,7 +181,7 @@ static void kbd_wait_for_fifo_init(struct keyb *config) * @param input Input configuration * @return 1, to indicate that we have something to look at */ -int tegra_kbc_check(struct input_config *input) +static int tegra_kbc_check(struct input_config *input) { kbd_wait_for_fifo_init(&config); check_for_keys(&config); diff --git a/drivers/mmc/bcm2835_sdhci.c b/drivers/mmc/bcm2835_sdhci.c index 82079d6..92f7d89 100644 --- a/drivers/mmc/bcm2835_sdhci.c +++ b/drivers/mmc/bcm2835_sdhci.c @@ -40,6 +40,7 @@ #include <malloc.h> #include <sdhci.h> #include <asm/arch/timer.h> +#include <asm/arch-bcm2835/sdhci.h> /* 400KHz is max freq for card ID etc. Use that as min */ #define MIN_FREQ 400000 diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c index 3125d13..de88e19 100644 --- a/drivers/mmc/sdhci.c +++ b/drivers/mmc/sdhci.c @@ -124,7 +124,7 @@ static int sdhci_transfer_data(struct sdhci_host *host, struct mmc_data *data, #endif #define CONFIG_SDHCI_CMD_DEFAULT_TIMEOUT 100 -int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd, +static int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data) { struct sdhci_host *host = mmc->priv; @@ -355,7 +355,7 @@ static void sdhci_set_power(struct sdhci_host *host, unsigned short power) sdhci_writeb(host, pwr, SDHCI_POWER_CONTROL); } -void sdhci_set_ios(struct mmc *mmc) +static void sdhci_set_ios(struct mmc *mmc) { u32 ctrl; struct sdhci_host *host = mmc->priv; @@ -393,7 +393,7 @@ void sdhci_set_ios(struct mmc *mmc) sdhci_writeb(host, ctrl, SDHCI_HOST_CONTROL); } -int sdhci_init(struct mmc *mmc) +static int sdhci_init(struct mmc *mmc) { struct sdhci_host *host = mmc->priv; diff --git a/drivers/mmc/tegra_mmc.c b/drivers/mmc/tegra_mmc.c index 2642fe2..2bd36b0 100644 --- a/drivers/mmc/tegra_mmc.c +++ b/drivers/mmc/tegra_mmc.c @@ -13,6 +13,7 @@ #include <asm/io.h> #include <asm/arch/clock.h> #include <asm/arch-tegra/clk_rst.h> +#include <asm/arch-tegra/mmc.h> #include <asm/arch-tegra/tegra_mmc.h> #include <mmc.h> @@ -508,7 +509,7 @@ static int tegra_mmc_core_init(struct mmc *mmc) return 0; } -int tegra_mmc_getcd(struct mmc *mmc) +static int tegra_mmc_getcd(struct mmc *mmc) { struct mmc_host *host = mmc->priv; diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c index 9b3175d..50983b8 100644 --- a/drivers/mtd/cfi_flash.c +++ b/drivers/mtd/cfi_flash.c @@ -63,6 +63,12 @@ flash_info_t flash_info[CFI_MAX_FLASH_BANKS]; /* FLASH chips info */ #define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_8BIT #endif +#ifdef CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS +#define __maybe_weak __weak +#else +#define __maybe_weak static +#endif + /* * 0xffff is an undefined value for the configuration register. When * this value is returned, the configuration register shall not be @@ -81,14 +87,12 @@ static u16 cfi_flash_config_reg(int i) int cfi_flash_num_flash_banks = CONFIG_SYS_MAX_FLASH_BANKS_DETECT; #endif -static phys_addr_t __cfi_flash_bank_addr(int i) +__weak phys_addr_t cfi_flash_bank_addr(int i) { return ((phys_addr_t [])CONFIG_SYS_FLASH_BANKS_LIST)[i]; } -phys_addr_t cfi_flash_bank_addr(int i) - __attribute__((weak, alias("__cfi_flash_bank_addr"))); -static unsigned long __cfi_flash_bank_size(int i) +__weak unsigned long cfi_flash_bank_size(int i) { #ifdef CONFIG_SYS_FLASH_BANKS_SIZES return ((unsigned long [])CONFIG_SYS_FLASH_BANKS_SIZES)[i]; @@ -96,71 +100,49 @@ static unsigned long __cfi_flash_bank_size(int i) return 0; #endif } -unsigned long cfi_flash_bank_size(int i) - __attribute__((weak, alias("__cfi_flash_bank_size"))); -static void __flash_write8(u8 value, void *addr) +__maybe_weak void flash_write8(u8 value, void *addr) { __raw_writeb(value, addr); } -static void __flash_write16(u16 value, void *addr) +__maybe_weak void flash_write16(u16 value, void *addr) { __raw_writew(value, addr); } -static void __flash_write32(u32 value, void *addr) +__maybe_weak void flash_write32(u32 value, void *addr) { __raw_writel(value, addr); } -static void __flash_write64(u64 value, void *addr) +__maybe_weak void flash_write64(u64 value, void *addr) { /* No architectures currently implement __raw_writeq() */ *(volatile u64 *)addr = value; } -static u8 __flash_read8(void *addr) +__maybe_weak u8 flash_read8(void *addr) { return __raw_readb(addr); } -static u16 __flash_read16(void *addr) +__maybe_weak u16 flash_read16(void *addr) { return __raw_readw(addr); } -static u32 __flash_read32(void *addr) +__maybe_weak u32 flash_read32(void *addr) { return __raw_readl(addr); } -static u64 __flash_read64(void *addr) +__maybe_weak u64 flash_read64(void *addr) { /* No architectures currently implement __raw_readq() */ return *(volatile u64 *)addr; } -#ifdef CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS -void flash_write8(u8 value, void *addr)__attribute__((weak, alias("__flash_write8"))); -void flash_write16(u16 value, void *addr)__attribute__((weak, alias("__flash_write16"))); -void flash_write32(u32 value, void *addr)__attribute__((weak, alias("__flash_write32"))); -void flash_write64(u64 value, void *addr)__attribute__((weak, alias("__flash_write64"))); -u8 flash_read8(void *addr)__attribute__((weak, alias("__flash_read8"))); -u16 flash_read16(void *addr)__attribute__((weak, alias("__flash_read16"))); -u32 flash_read32(void *addr)__attribute__((weak, alias("__flash_read32"))); -u64 flash_read64(void *addr)__attribute__((weak, alias("__flash_read64"))); -#else -#define flash_write8 __flash_write8 -#define flash_write16 __flash_write16 -#define flash_write32 __flash_write32 -#define flash_write64 __flash_write64 -#define flash_read8 __flash_read8 -#define flash_read16 __flash_read16 -#define flash_read32 __flash_read32 -#define flash_read64 __flash_read64 -#endif - /*----------------------------------------------------------------------- */ #if defined(CONFIG_ENV_IS_IN_FLASH) || defined(CONFIG_ENV_ADDR_REDUND) || (CONFIG_SYS_MONITOR_BASE >= CONFIG_SYS_FLASH_BASE) diff --git a/drivers/mtd/nand/omap_gpmc.c b/drivers/mtd/nand/omap_gpmc.c index db1599e..40d6705 100644 --- a/drivers/mtd/nand/omap_gpmc.c +++ b/drivers/mtd/nand/omap_gpmc.c @@ -75,7 +75,7 @@ static void omap_nand_hwcontrol(struct mtd_info *mtd, int32_t cmd, #ifdef CONFIG_SPL_BUILD /* Check wait pin as dev ready indicator */ -int omap_spl_dev_ready(struct mtd_info *mtd) +static int omap_spl_dev_ready(struct mtd_info *mtd) { return gpmc_cfg->status & (1 << 8); } @@ -162,23 +162,6 @@ static int __maybe_unused omap_correct_data(struct mtd_info *mtd, uint8_t *dat, } /* - * omap_reverse_list - re-orders list elements in reverse order [internal] - * @list: pointer to start of list - * @length: length of list -*/ -void omap_reverse_list(u8 *list, unsigned int length) -{ - unsigned int i, j; - unsigned int half_length = length / 2; - u8 tmp; - for (i = 0, j = length - 1; i < half_length; i++, j--) { - tmp = list[i]; - list[i] = list[j]; - list[j] = tmp; - } -} - -/* * omap_enable_hwecc - configures GPMC as per ECC scheme before read/write * @mtd: MTD device structure * @mode: Read/Write mode @@ -351,6 +334,23 @@ static int omap_calculate_ecc(struct mtd_info *mtd, const uint8_t *dat, #ifdef CONFIG_NAND_OMAP_ELM /* + * omap_reverse_list - re-orders list elements in reverse order [internal] + * @list: pointer to start of list + * @length: length of list +*/ +static void omap_reverse_list(u8 *list, unsigned int length) +{ + unsigned int i, j; + unsigned int half_length = length / 2; + u8 tmp; + for (i = 0, j = length - 1; i < half_length; i++, j--) { + tmp = list[i]; + list[i] = list[j]; + list[j] = tmp; + } +} + +/* * omap_correct_data_bch - Compares the ecc read from nand spare area * with ECC registers values and corrects one bit error if it has occured * diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c index 439f8ae..08bc1af 100644 --- a/drivers/net/davinci_emac.c +++ b/drivers/net/davinci_emac.c @@ -27,6 +27,7 @@ #include <net.h> #include <miiphy.h> #include <malloc.h> +#include <netdev.h> #include <linux/compiler.h> #include <asm/arch/emac_defs.h> #include <asm/io.h> diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index 549d648..b572470 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -11,6 +11,7 @@ #include <common.h> #include <malloc.h> #include <net.h> +#include <netdev.h> #include <miiphy.h> #include "fec_mxc.h" @@ -179,13 +180,14 @@ static int fec_mdio_write(struct ethernet_regs *eth, uint8_t phyAddr, return 0; } -int fec_phy_read(struct mii_dev *bus, int phyAddr, int dev_addr, int regAddr) +static int fec_phy_read(struct mii_dev *bus, int phyAddr, int dev_addr, + int regAddr) { return fec_mdio_read(bus->priv, phyAddr, regAddr); } -int fec_phy_write(struct mii_dev *bus, int phyAddr, int dev_addr, int regAddr, - u16 data) +static int fec_phy_write(struct mii_dev *bus, int phyAddr, int dev_addr, + int regAddr, u16 data) { return fec_mdio_write(bus->priv, phyAddr, regAddr, data); } diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 1d6c14f..f1ace3c 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -575,7 +575,7 @@ static struct phy_device *phy_device_create(struct mii_dev *bus, int addr, * Description: Reads the ID registers of the PHY at @addr on the * @bus, stores it in @phy_id and returns zero on success. */ -int __weak get_phy_id(struct mii_dev *bus, int addr, int devad, u32 *phy_id) +static int get_phy_id(struct mii_dev *bus, int addr, int devad, u32 *phy_id) { int phy_reg; @@ -785,16 +785,13 @@ int phy_startup(struct phy_device *phydev) return 0; } -static int __board_phy_config(struct phy_device *phydev) +__weak int board_phy_config(struct phy_device *phydev) { if (phydev->drv->config) return phydev->drv->config(phydev); return 0; } -int board_phy_config(struct phy_device *phydev) - __attribute__((weak, alias("__board_phy_config"))); - int phy_config(struct phy_device *phydev) { /* Invoke an optional board-specific helper */ diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 28859f3..60c333e 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -572,7 +572,7 @@ const char * pci_class_str(u8 class) } #endif /* CONFIG_CMD_PCI || CONFIG_PCI_SCAN_SHOW */ -int __pci_skip_dev(struct pci_controller *hose, pci_dev_t dev) +__weak int pci_skip_dev(struct pci_controller *hose, pci_dev_t dev) { /* * Check if pci device should be skipped in configuration @@ -591,19 +591,15 @@ int __pci_skip_dev(struct pci_controller *hose, pci_dev_t dev) return 0; } -int pci_skip_dev(struct pci_controller *hose, pci_dev_t dev) - __attribute__((weak, alias("__pci_skip_dev"))); #ifdef CONFIG_PCI_SCAN_SHOW -int __pci_print_dev(struct pci_controller *hose, pci_dev_t dev) +__weak int pci_print_dev(struct pci_controller *hose, pci_dev_t dev) { if (dev == PCI_BDF(hose->first_busno, 0, 0)) return 0; return 1; } -int pci_print_dev(struct pci_controller *hose, pci_dev_t dev) - __attribute__((weak, alias("__pci_print_dev"))); #endif /* CONFIG_PCI_SCAN_SHOW */ int pci_hose_scan_bus(struct pci_controller *hose, int bus) diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c index bbe60af..18e41b2 100644 --- a/drivers/serial/serial.c +++ b/drivers/serial/serial.c @@ -254,28 +254,28 @@ void serial_initialize(void) serial_assign(default_serial_console()->name); } -int serial_stub_start(struct stdio_dev *sdev) +static int serial_stub_start(struct stdio_dev *sdev) { struct serial_device *dev = sdev->priv; return dev->start(); } -int serial_stub_stop(struct stdio_dev *sdev) +static int serial_stub_stop(struct stdio_dev *sdev) { struct serial_device *dev = sdev->priv; return dev->stop(); } -void serial_stub_putc(struct stdio_dev *sdev, const char ch) +static void serial_stub_putc(struct stdio_dev *sdev, const char ch) { struct serial_device *dev = sdev->priv; dev->putc(ch); } -void serial_stub_puts(struct stdio_dev *sdev, const char *str) +static void serial_stub_puts(struct stdio_dev *sdev, const char *str) { struct serial_device *dev = sdev->priv; diff --git a/drivers/serial/serial_sh.c b/drivers/serial/serial_sh.c index 144a925..7c1f271 100644 --- a/drivers/serial/serial_sh.c +++ b/drivers/serial/serial_sh.c @@ -122,7 +122,7 @@ static void handle_error(void) sci_out(&sh_sci, SCLSR, 0x00); } -void serial_raw_putc(const char c) +static void serial_raw_putc(const char c) { while (1) { /* Tx fifo is empty */ @@ -152,7 +152,7 @@ static int sh_serial_tstc(void) } -int serial_getc_check(void) +static int serial_getc_check(void) { unsigned short status; diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 6323c50..936d006 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -119,15 +119,12 @@ static struct descriptor { #define ehci_is_TDI() (0) #endif -int __ehci_get_port_speed(struct ehci_hcor *hcor, uint32_t reg) +__weak int ehci_get_port_speed(struct ehci_hcor *hcor, uint32_t reg) { return PORTSC_PSPD(reg); } -int ehci_get_port_speed(struct ehci_hcor *hcor, uint32_t reg) - __attribute__((weak, alias("__ehci_get_port_speed"))); - -void __ehci_set_usbmode(int index) +__weak void ehci_set_usbmode(int index) { uint32_t tmp; uint32_t *reg_ptr; @@ -141,17 +138,11 @@ void __ehci_set_usbmode(int index) ehci_writel(reg_ptr, tmp); } -void ehci_set_usbmode(int index) - __attribute__((weak, alias("__ehci_set_usbmode"))); - -void __ehci_powerup_fixup(uint32_t *status_reg, uint32_t *reg) +__weak void ehci_powerup_fixup(uint32_t *status_reg, uint32_t *reg) { mdelay(50); } -void ehci_powerup_fixup(uint32_t *status_reg, uint32_t *reg) - __attribute__((weak, alias("__ehci_powerup_fixup"))); - static int handshake(uint32_t *ptr, uint32_t mask, uint32_t done, int usec) { uint32_t result; @@ -1323,7 +1314,7 @@ void *poll_int_queue(struct usb_device *dev, struct int_queue *queue) } /* Do not free buffers associated with QHs, they're owned by someone else */ -int +static int destroy_int_queue(struct usb_device *dev, struct int_queue *queue) { struct ehci_ctrl *ctrl = dev->controller; diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index 9231927..6aa50cb 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -944,7 +944,7 @@ static void parse_putc(const char c) CURSOR_SET; } -void video_putc(struct stdio_dev *dev, const char c) +static void video_putc(struct stdio_dev *dev, const char c) { #ifdef CONFIG_CFB_CONSOLE_ANSI int i; @@ -1158,7 +1158,7 @@ void video_putc(struct stdio_dev *dev, const char c) flush_cache(VIDEO_FB_ADRS, VIDEO_SIZE); } -void video_puts(struct stdio_dev *dev, const char *s) +static void video_puts(struct stdio_dev *dev, const char *s) { int count = strlen(s); @@ -1171,14 +1171,11 @@ void video_puts(struct stdio_dev *dev, const char *s) * video_set_lut() if they do not support 8 bpp format. * Implement weak default function instead. */ -void __video_set_lut(unsigned int index, unsigned char r, +__weak void video_set_lut(unsigned int index, unsigned char r, unsigned char g, unsigned char b) { } -void video_set_lut(unsigned int, unsigned char, unsigned char, unsigned char) - __attribute__ ((weak, alias("__video_set_lut"))); - #if defined(CONFIG_CMD_BMP) || defined(CONFIG_SPLASH_SCREEN) #define FILL_8BIT_332RGB(r,g,b) { \ @@ -2240,15 +2237,12 @@ static int video_init(void) * Implement a weak default function for boards that optionally * need to skip the video initialization. */ -int __board_video_skip(void) +__weak int board_video_skip(void) { /* As default, don't skip test */ return 0; } -int board_video_skip(void) - __attribute__ ((weak, alias("__board_video_skip"))); - int drv_video_init(void) { int skip_dev_init; diff --git a/drivers/video/exynos_fb.c b/drivers/video/exynos_fb.c index 180a3b4..be35b98 100644 --- a/drivers/video/exynos_fb.c +++ b/drivers/video/exynos_fb.c @@ -58,54 +58,38 @@ static void exynos_lcd_init(vidinfo_t *vid) lcd_set_flush_dcache(1); } -void __exynos_cfg_lcd_gpio(void) +__weak void exynos_cfg_lcd_gpio(void) { } -void exynos_cfg_lcd_gpio(void) - __attribute__((weak, alias("__exynos_cfg_lcd_gpio"))); -void __exynos_backlight_on(unsigned int onoff) +__weak void exynos_backlight_on(unsigned int onoff) { } -void exynos_backlight_on(unsigned int onoff) - __attribute__((weak, alias("__exynos_cfg_lcd_gpio"))); -void __exynos_reset_lcd(void) +__weak void exynos_reset_lcd(void) { } -void exynos_reset_lcd(void) - __attribute__((weak, alias("__exynos_reset_lcd"))); -void __exynos_lcd_power_on(void) +__weak void exynos_lcd_power_on(void) { } -void exynos_lcd_power_on(void) - __attribute__((weak, alias("__exynos_lcd_power_on"))); -void __exynos_cfg_ldo(void) +__weak void exynos_cfg_ldo(void) { } -void exynos_cfg_ldo(void) - __attribute__((weak, alias("__exynos_cfg_ldo"))); -void __exynos_enable_ldo(unsigned int onoff) +__weak void exynos_enable_ldo(unsigned int onoff) { } -void exynos_enable_ldo(unsigned int onoff) - __attribute__((weak, alias("__exynos_enable_ldo"))); -void __exynos_backlight_reset(void) +__weak void exynos_backlight_reset(void) { } -void exynos_backlight_reset(void) - __attribute__((weak, alias("__exynos_backlight_reset"))); -int __exynos_lcd_misc_init(vidinfo_t *vid) +__weak int exynos_lcd_misc_init(vidinfo_t *vid) { return 0; } -int exynos_lcd_misc_init(vidinfo_t *vid) - __attribute__((weak, alias("__exynos_lcd_misc_init"))); static void lcd_panel_on(vidinfo_t *vid) { diff --git a/drivers/video/ipu_common.c b/drivers/video/ipu_common.c index 8d4e925..5873531 100644 --- a/drivers/video/ipu_common.c +++ b/drivers/video/ipu_common.c @@ -379,7 +379,7 @@ static struct clk pixel_clk[] = { /* * This function resets IPU */ -void ipu_reset(void) +static void ipu_reset(void) { u32 *reg; u32 value; diff --git a/drivers/video/ipu_disp.c b/drivers/video/ipu_disp.c index 48fee99..4faeafb 100644 --- a/drivers/video/ipu_disp.c +++ b/drivers/video/ipu_disp.c @@ -377,7 +377,7 @@ static struct dp_csc_param_t dp_csc_array[CSC_NUM][CSC_NUM] = { static enum csc_type_t fg_csc_type = CSC_NONE, bg_csc_type = CSC_NONE; static int color_key_4rgb = 1; -void ipu_dp_csc_setup(int dp, struct dp_csc_param_t dp_csc_param, +static void ipu_dp_csc_setup(int dp, struct dp_csc_param_t dp_csc_param, unsigned char srm_mode_update) { u32 reg; @@ -605,17 +605,6 @@ void ipu_dc_uninit(int dc_chan) } } -int ipu_chan_is_interlaced(ipu_channel_t channel) -{ - if (channel == MEM_DC_SYNC) - return !!(__raw_readl(DC_WR_CH_CONF_1) & - DC_WR_CH_CONF_FIELD_MODE); - else if ((channel == MEM_BG_SYNC) || (channel == MEM_FG_SYNC)) - return !!(__raw_readl(DC_WR_CH_CONF_5) & - DC_WR_CH_CONF_FIELD_MODE); - return 0; -} - void ipu_dp_dc_enable(ipu_channel_t channel) { int di; @@ -782,7 +771,7 @@ void ipu_init_dc_mappings(void) ipu_dc_map_config(4, 2, 21, 0xFC); } -int ipu_pixfmt_to_map(uint32_t fmt) +static int ipu_pixfmt_to_map(uint32_t fmt) { switch (fmt) { case IPU_PIX_FMT_GENERIC: diff --git a/drivers/video/mxc_ipuv3_fb.c b/drivers/video/mxc_ipuv3_fb.c index b20c19c..1fa9531 100644 --- a/drivers/video/mxc_ipuv3_fb.c +++ b/drivers/video/mxc_ipuv3_fb.c @@ -36,7 +36,7 @@ static struct fb_videomode const *gmode; static uint8_t gdisp; static uint32_t gpixfmt; -void fb_videomode_to_var(struct fb_var_screeninfo *var, +static void fb_videomode_to_var(struct fb_var_screeninfo *var, const struct fb_videomode *mode) { var->xres = mode->xres; |