diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2015-01-09 17:38:26 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-01-09 17:38:26 +0100 |
commit | ff6383c8e4bde31036fbd31f7961539be288d6af (patch) | |
tree | 26f187f697be5f434f533d6b304bddd311cc81fd /drivers | |
parent | 2af31fbc239ae40a59f926bc5e505956a1bf27ef (diff) | |
parent | 11f588be314af70e1b058aac06663f29606846cd (diff) | |
download | barebox-ff6383c8e4bde31036fbd31f7961539be288d6af.tar.gz barebox-ff6383c8e4bde31036fbd31f7961539be288d6af.tar.xz |
Merge branch 'for-next/misc'
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ata/ahci.c | 2 | ||||
-rw-r--r-- | drivers/bus/omap-gpmc.c | 2 | ||||
-rw-r--r-- | drivers/clocksource/Kconfig | 27 | ||||
-rw-r--r-- | drivers/clocksource/Makefile | 1 | ||||
-rw-r--r-- | drivers/clocksource/dummy.c | 55 | ||||
-rw-r--r-- | drivers/mtd/nand/nand_ids.c | 2 | ||||
-rw-r--r-- | drivers/net/mvneta.c | 2 | ||||
-rw-r--r-- | drivers/net/orion-gbe.c | 2 | ||||
-rw-r--r-- | drivers/net/rtl8169.c | 24 | ||||
-rw-r--r-- | drivers/of/base.c | 2 | ||||
-rw-r--r-- | drivers/of/fdt.c | 2 | ||||
-rw-r--r-- | drivers/pci/pci-mvebu.c | 2 | ||||
-rw-r--r-- | drivers/pci/pci-tegra.c | 2 | ||||
-rw-r--r-- | drivers/pci/pci.c | 2 | ||||
-rw-r--r-- | drivers/pinctrl/mvebu/armada-370.c | 2 | ||||
-rw-r--r-- | drivers/pinctrl/mvebu/armada-xp.c | 2 | ||||
-rw-r--r-- | drivers/pinctrl/mvebu/dove.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/f_fastboot.c | 5 | ||||
-rw-r--r-- | drivers/video/imx-ipu-v3/imx-hdmi.c | 20 |
19 files changed, 43 insertions, 115 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 645e9b5b7e..346ab98134 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -32,7 +32,7 @@ #include <disks.h> #include <asm/mmu.h> #include <ata_drive.h> -#include <sizes.h> +#include <linux/sizes.h> #include <clock.h> #include "ahci.h" diff --git a/drivers/bus/omap-gpmc.c b/drivers/bus/omap-gpmc.c index 6cc3269993..6752c42a35 100644 --- a/drivers/bus/omap-gpmc.c +++ b/drivers/bus/omap-gpmc.c @@ -11,7 +11,7 @@ #include <driver.h> #include <malloc.h> #include <init.h> -#include <sizes.h> +#include <linux/sizes.h> #include <io.h> #include <of.h> #include <of_address.h> diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig index fc5a389b95..598edc9a81 100644 --- a/drivers/clocksource/Kconfig +++ b/drivers/clocksource/Kconfig @@ -18,28 +18,21 @@ config CLOCKSOURCE_DIGIC bool depends on ARCH_DIGIC -config CLOCKSOURCE_DUMMY - bool "Enable dummy software-only clocksource" +config CLOCKSOURCE_DUMMY_RATE + int + prompt "dummy clocksource rate" + default 1000 help When porting barebox to a new SoC there might be a case of broken or absent clocksource. This causes barebox serial console to be non functional. - To solve the problem this software-only clocksource driver is used. - WARNING!!! This clocksource doesn't provide correct timing. - To adjust this clocksource please use CONFIG_CLOCKSOURCE_DUMMY_RATE. + To solve the problem barebox has built-in software-only clocksource. + The software-only clocksource is used only if no hardware clocksource + is registered. This can help if initialization order is wrong so that + the time functions are used before the real clocksource was initialized. + WARNING!!! Built-in software-only clocksource doesn't provide correct timing. + The option CONFIG_CLOCKSOURCE_DUMMY_RATE is used to adjust this clocksource. The bigger rate valuest makes clocksource "faster". - It's possible to add this clocksource unconditionally. - This clocksource starts very early (pure_initcall) so - real clocksource will take over. - This can help if initialization order is wrong so that - the time functions are used before the real clocksource - was initialized. - -config CLOCKSOURCE_DUMMY_RATE - int - prompt "dummy clocksource rate" - depends on CLOCKSOURCE_DUMMY - default 1000 config CLOCKSOURCE_MVEBU bool diff --git a/drivers/clocksource/Makefile b/drivers/clocksource/Makefile index b80df6b2c9..f5f5141a3d 100644 --- a/drivers/clocksource/Makefile +++ b/drivers/clocksource/Makefile @@ -3,7 +3,6 @@ obj-$(CONFIG_ARM_SMP_TWD) += arm_smp_twd.o obj-$(CONFIG_CLOCKSOURCE_BCM2835) += bcm2835.o obj-$(CONFIG_CLOCKSOURCE_CLPS711X) += clps711x.o obj-$(CONFIG_CLOCKSOURCE_DIGIC) += digic.o -obj-$(CONFIG_CLOCKSOURCE_DUMMY) += dummy.o obj-$(CONFIG_CLOCKSOURCE_MVEBU) += mvebu.o obj-$(CONFIG_CLOCKSOURCE_NOMADIK) += nomadik.o obj-$(CONFIG_CLOCKSOURCE_ORION) += orion.o diff --git a/drivers/clocksource/dummy.c b/drivers/clocksource/dummy.c deleted file mode 100644 index 96f9b6efca..0000000000 --- a/drivers/clocksource/dummy.c +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (C) 2013 Antony Pavlov <antonynpavlov@gmail.com> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ - -#include <common.h> -#include <init.h> -#include <clock.h> - -static uint64_t dummy_counter; - -static uint64_t dummy_cs_read(void) -{ - static int first; - - if (!first) { - pr_warn("Warning: Using dummy clocksource\n"); - first = 1; - } - - dummy_counter += CONFIG_CLOCKSOURCE_DUMMY_RATE; - - return dummy_counter; -} - -static struct clocksource dummy_cs = { - .read = dummy_cs_read, - .mask = CLOCKSOURCE_MASK(32), -}; - -static int clocksource_init(void) -{ - dummy_counter = 0; - - clocks_calc_mult_shift(&dummy_cs.mult, &dummy_cs.shift, - 100000000, NSEC_PER_SEC, 10); - - pr_debug("clocksource_init: mult=%08x, shift=%08x\n", - dummy_cs.mult, dummy_cs.shift); - - return init_clock(&dummy_cs); -} -pure_initcall(clocksource_init); diff --git a/drivers/mtd/nand/nand_ids.c b/drivers/mtd/nand/nand_ids.c index 52b0da5927..dc0f8c6aa3 100644 --- a/drivers/mtd/nand/nand_ids.c +++ b/drivers/mtd/nand/nand_ids.c @@ -9,7 +9,7 @@ * */ #include <common.h> -#include <sizes.h> +#include <linux/sizes.h> #include <linux/mtd/nand.h> #ifdef CONFIG_NAND_INFO diff --git a/drivers/net/mvneta.c b/drivers/net/mvneta.c index 7734cf8a44..8042e90951 100644 --- a/drivers/net/mvneta.c +++ b/drivers/net/mvneta.c @@ -28,7 +28,7 @@ #include <io.h> #include <net.h> #include <of_net.h> -#include <sizes.h> +#include <linux/sizes.h> #include <asm/mmu.h> #include <linux/clk.h> #include <linux/err.h> diff --git a/drivers/net/orion-gbe.c b/drivers/net/orion-gbe.c index ab761ad2e0..3fbc1df893 100644 --- a/drivers/net/orion-gbe.c +++ b/drivers/net/orion-gbe.c @@ -31,7 +31,7 @@ #include <io.h> #include <net.h> #include <of_net.h> -#include <sizes.h> +#include <linux/sizes.h> #include <asm/mmu.h> #include <linux/clk.h> #include <linux/err.h> diff --git a/drivers/net/rtl8169.c b/drivers/net/rtl8169.c index 5702900e49..19f5763c87 100644 --- a/drivers/net/rtl8169.c +++ b/drivers/net/rtl8169.c @@ -50,11 +50,11 @@ struct rtl8169_priv { struct pci_dev *pci_dev; int chipset; - struct bufdesc *tx_desc; + volatile struct bufdesc *tx_desc; void *tx_buf; unsigned int cur_tx; - struct bufdesc *rx_desc; + volatile struct bufdesc *rx_desc; void *rx_buf; unsigned int cur_rx; @@ -250,10 +250,6 @@ static void rtl8169_init_ring(struct rtl8169_priv *priv) priv->rx_desc[i].buf_addr = virt_to_phys(priv->rx_buf + i * PKT_BUF_SIZE); } - - dma_flush_range((unsigned long)priv->rx_desc, - (unsigned long)priv->rx_desc + - NUM_RX_DESC * sizeof(struct bufdesc)); } static void rtl8169_hw_start(struct rtl8169_priv *priv) @@ -386,14 +382,10 @@ static int rtl8169_eth_send(struct eth_device *edev, void *packet, ((packet_length > ETH_ZLEN) ? packet_length : ETH_ZLEN); } - dma_flush_range((unsigned long)&priv->tx_desc[entry], - (unsigned long)&priv->tx_desc[entry + 1]); - RTL_W8(priv, TxPoll, 0x40); - do { - dma_inv_range((unsigned long)&priv->tx_desc[entry], - (unsigned long)&priv->tx_desc[entry + 1]); - } while (priv->tx_desc[entry].status & BD_STAT_OWN); + + while (priv->tx_desc[entry].status & BD_STAT_OWN) + ; priv->cur_tx++; @@ -408,9 +400,6 @@ static int rtl8169_eth_rx(struct eth_device *edev) entry = priv->cur_rx % NUM_RX_DESC; - dma_inv_range((unsigned long)&priv->rx_desc[entry], - (unsigned long)&priv->rx_desc[entry + 1]); - if ((priv->rx_desc[entry].status & BD_STAT_OWN) == 0) { if (!(priv->rx_desc[entry].status & BD_STAT_RX_RES)) { pkt_size = (priv->rx_desc[entry].status & 0x1fff) - 4; @@ -441,9 +430,6 @@ static int rtl8169_eth_rx(struct eth_device *edev) priv->rx_desc[entry].buf_addr = virt_to_phys(priv->rx_buf + entry * PKT_BUF_SIZE); - - dma_flush_range((unsigned long)&priv->rx_desc[entry], - (unsigned long)&priv->rx_desc[entry + 1]); } else { dev_err(&edev->dev, "rx error\n"); } diff --git a/drivers/of/base.c b/drivers/of/base.c index e9f0883f47..af10fd1da3 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -24,7 +24,7 @@ #include <malloc.h> #include <init.h> #include <memory.h> -#include <sizes.h> +#include <linux/sizes.h> #include <linux/ctype.h> #include <linux/amba/bus.h> #include <linux/err.h> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index d84b2037cb..dfa95c38c8 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -23,7 +23,7 @@ #include <malloc.h> #include <init.h> #include <memory.h> -#include <sizes.h> +#include <linux/sizes.h> #include <linux/ctype.h> #include <linux/err.h> diff --git a/drivers/pci/pci-mvebu.c b/drivers/pci/pci-mvebu.c index a314a689c0..5e2b87a9e1 100644 --- a/drivers/pci/pci-mvebu.c +++ b/drivers/pci/pci-mvebu.c @@ -20,7 +20,7 @@ #include <of_address.h> #include <of_gpio.h> #include <of_pci.h> -#include <sizes.h> +#include <linux/sizes.h> #include "pci-mvebu.h" diff --git a/drivers/pci/pci-tegra.c b/drivers/pci/pci-tegra.c index 1ff3c0d150..1e7907e5b1 100644 --- a/drivers/pci/pci-tegra.c +++ b/drivers/pci/pci-tegra.c @@ -32,7 +32,7 @@ #include <linux/pci.h> #include <linux/phy/phy.h> #include <linux/reset.h> -#include <sizes.h> +#include <linux/sizes.h> #include <mach/tegra-powergate.h> #include <regulator.h> diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 7f8ebcfe43..5b848eeb2a 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -1,5 +1,5 @@ #include <common.h> -#include <sizes.h> +#include <linux/sizes.h> #include <linux/pci.h> #ifdef DEBUG diff --git a/drivers/pinctrl/mvebu/armada-370.c b/drivers/pinctrl/mvebu/armada-370.c index 4778358fad..bcfe40e6c8 100644 --- a/drivers/pinctrl/mvebu/armada-370.c +++ b/drivers/pinctrl/mvebu/armada-370.c @@ -17,7 +17,7 @@ #include <malloc.h> #include <of.h> #include <of_address.h> -#include <sizes.h> +#include <linux/sizes.h> #include "common.h" diff --git a/drivers/pinctrl/mvebu/armada-xp.c b/drivers/pinctrl/mvebu/armada-xp.c index 8c71867a7d..1745776a4d 100644 --- a/drivers/pinctrl/mvebu/armada-xp.c +++ b/drivers/pinctrl/mvebu/armada-xp.c @@ -26,7 +26,7 @@ #include <malloc.h> #include <of.h> #include <of_address.h> -#include <sizes.h> +#include <linux/sizes.h> #include "common.h" diff --git a/drivers/pinctrl/mvebu/dove.c b/drivers/pinctrl/mvebu/dove.c index bd0a632f1f..a2133a093b 100644 --- a/drivers/pinctrl/mvebu/dove.c +++ b/drivers/pinctrl/mvebu/dove.c @@ -15,7 +15,7 @@ #include <malloc.h> #include <of.h> #include <of_address.h> -#include <sizes.h> +#include <linux/sizes.h> #include "common.h" diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c index 92a1a218c6..76879db1f1 100644 --- a/drivers/usb/gadget/f_fastboot.c +++ b/drivers/usb/gadget/f_fastboot.c @@ -653,7 +653,8 @@ static void do_bootm_on_complete(struct usb_ep *ep, struct usb_request *req) pr_err("Booting failed\n"); } -static void cb_boot(struct usb_ep *ep, struct usb_request *req, const char *opt) +static void __maybe_unused cb_boot(struct usb_ep *ep, struct usb_request *req, + const char *opt) { struct f_fastboot *f_fb = req->context; @@ -857,9 +858,11 @@ static const struct cmd_dispatch_info cmd_dispatch_info[] = { }, { .cmd = "download:", .cb = cb_download, +#if defined(CONFIG_BOOTM) }, { .cmd = "boot", .cb = cb_boot, +#endif }, { .cmd = "flash:", .cb = cb_flash, diff --git a/drivers/video/imx-ipu-v3/imx-hdmi.c b/drivers/video/imx-ipu-v3/imx-hdmi.c index 4f462889a8..2da76a4b7a 100644 --- a/drivers/video/imx-ipu-v3/imx-hdmi.c +++ b/drivers/video/imx-ipu-v3/imx-hdmi.c @@ -1190,16 +1190,18 @@ static int imx_hdmi_probe(struct device_d *dev) if (ret) return ret; - ddc_node = of_parse_phandle(np, "ddc-i2c-bus", 0); - if (ddc_node) { - hdmi->ddc = of_find_i2c_adapter_by_node(ddc_node); - if (!hdmi->ddc) - dev_dbg(hdmi->dev, "failed to read ddc node\n"); - } else { - dev_dbg(hdmi->dev, "no ddc property found\n"); - } + if (IS_ENABLED(CONFIG_DRIVER_VIDEO_EDID)) { + ddc_node = of_parse_phandle(np, "ddc-i2c-bus", 0); + if (ddc_node) { + hdmi->ddc = of_find_i2c_adapter_by_node(ddc_node); + if (!hdmi->ddc) + dev_dbg(hdmi->dev, "failed to read ddc node\n"); + } else { + dev_dbg(hdmi->dev, "no ddc property found\n"); + } - ddc_node = NULL; + ddc_node = NULL; + } hdmi->regs = dev_request_mem_region(dev, 0); if (!hdmi->regs) |