From e5f00f0180994b7ab218e904b3426f1c66eb6da7 Mon Sep 17 00:00:00 2001 From: Phil Edworthy Date: Wed, 24 May 2017 15:09:49 +0100 Subject: dfu: dfu_sf: Fix read offset The offset was applied to write, but not read, now its applied to both. Signed-off-by: Phil Edworthy --- drivers/dfu/dfu_sf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/dfu/dfu_sf.c b/drivers/dfu/dfu_sf.c index 9702eee..b6d5fe2 100644 --- a/drivers/dfu/dfu_sf.c +++ b/drivers/dfu/dfu_sf.c @@ -20,7 +20,8 @@ static long dfu_get_medium_size_sf(struct dfu_entity *dfu) static int dfu_read_medium_sf(struct dfu_entity *dfu, u64 offset, void *buf, long *len) { - return spi_flash_read(dfu->data.sf.dev, offset, *len, buf); + return spi_flash_read(dfu->data.sf.dev, dfu->data.sf.start + offset, + *len, buf); } static u64 find_sector(struct dfu_entity *dfu, u64 start, u64 offset) -- cgit v1.1 From 2cb7b900f42ad796b8dc50afe8379bbda64e80e9 Mon Sep 17 00:00:00 2001 From: Alexey Brodkin Date: Mon, 5 Jun 2017 10:19:26 +0300 Subject: ehci-pci: Prepare for usage of readl()/writel() accessors We used to have opencoded ehci_readl()/writel() which required no external functions to be called. Now with attempt to switch to generic readl()/writel() accessors we see a missing declaration of those accessors in ehci-ppc4xx. Something like that happens if applied http://patchwork.ozlabs.org/patch/726714/: --------------------------------->8--------------------------- CC drivers/usb/host/ehci-pci.o In file included from drivers/usb/host/ehci-pci.c:14:0: drivers/usb/host/ehci-pci.c: In function 'ehci_pci_init': drivers/usb/host/ehci.h:108:36: warning: implicit declaration of function 'readl' [-Wimplicit-function-declaration] #define ehci_readl(x) cpu_to_le32(readl(x)) ^ drivers/usb/host/ehci.h:23:26: note: in definition of macro 'HC_LENGTH' #define HC_LENGTH(p) (((p) >> 0) & 0x00ff) ^ include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__cpu_to_le32' #define cpu_to_le32 __cpu_to_le32 ^~~~~~~~~~~~~ drivers/usb/host/ehci-pci.c:33:14: note: in expansion of macro 'ehci_readl' HC_LENGTH(ehci_readl(&hccr->cr_capbase))); ^~~~~~~~~~ --------------------------------->8--------------------------- This the same fix as we have for "ehci-ppc4xx" in 83cb46c286b "ehci-ppc4xx: Prepare for usage of readl()/writel() accessors". Signed-off-by: Alexey Brodkin Cc: Simon Glass Cc: Tom Rini Cc: Marek Vasut Cc: Stefan Roese --- drivers/usb/host/ehci-pci.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers') diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c index f20fc33..dceba4b 100644 --- a/drivers/usb/host/ehci-pci.c +++ b/drivers/usb/host/ehci-pci.c @@ -10,6 +10,7 @@ #include #include #include +#include #include "ehci.h" -- cgit v1.1