From a2cd62ec9a3a2805014bdc14e0644b5faa352d3c Mon Sep 17 00:00:00 2001 From: Omar Ramirez Luna Date: Fri, 20 Apr 2012 20:22:41 -0500 Subject: staging: tidspbridge: remove usage of OMAP2_L4_IO_ADDRESS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead now use ioremap. This is needed for 3.4 since this change emerged in mainline during one of the previous rc cycles. These solves the following compilation breaks: drivers/staging/tidspbridge/core/tiomap3430.c: In function ‘bridge_brd_start’: drivers/staging/tidspbridge/core/tiomap3430.c:425:4: error: implicit declaration of function ‘OMAP2_L4_IO_ADDRESS’ drivers/staging/tidspbridge/core/wdt.c: In function ‘dsp_wdt_init’: drivers/staging/tidspbridge/core/wdt.c:56:2: error: implicit declaration of function ‘OMAP2_L4_IO_ADDRESS’ For control registers a new function needs to be defined so we can get rid of a layer violation, but that approach must be queued for the next merge window. As seen in: http://www.arm.linux.org.uk/developer/build/ platform: omap4430-sdp build: uImage config: randconfig version: 3.4.0-rc3 start time: Apr 20 2012 01:07 Reported-by: Tony Lindgren Signed-off-by: Omar Ramirez Luna Signed-off-by: Greg Kroah-Hartman --- drivers/staging/tidspbridge/core/tiomap3430.c | 20 ++++++++++++-------- drivers/staging/tidspbridge/core/wdt.c | 8 +++++++- 2 files changed, 19 insertions(+), 9 deletions(-) (limited to 'drivers') diff --git a/drivers/staging/tidspbridge/core/tiomap3430.c b/drivers/staging/tidspbridge/core/tiomap3430.c index 7862513cc295..9cf29fcea11e 100644 --- a/drivers/staging/tidspbridge/core/tiomap3430.c +++ b/drivers/staging/tidspbridge/core/tiomap3430.c @@ -79,10 +79,6 @@ #define OMAP343X_CONTROL_IVA2_BOOTADDR (OMAP2_CONTROL_GENERAL + 0x0190) #define OMAP343X_CONTROL_IVA2_BOOTMOD (OMAP2_CONTROL_GENERAL + 0x0194) -#define OMAP343X_CTRL_REGADDR(reg) \ - OMAP2_L4_IO_ADDRESS(OMAP343X_CTRL_BASE + (reg)) - - /* Forward Declarations: */ static int bridge_brd_monitor(struct bridge_dev_context *dev_ctxt); static int bridge_brd_read(struct bridge_dev_context *dev_ctxt, @@ -418,19 +414,27 @@ static int bridge_brd_start(struct bridge_dev_context *dev_ctxt, /* Assert RST1 i.e only the RST only for DSP megacell */ if (!status) { + /* + * XXX: ioremapping MUST be removed once ctrl + * function is made available. + */ + void __iomem *ctrl = ioremap(OMAP343X_CTRL_BASE, SZ_4K); + if (!ctrl) + return -ENOMEM; + (*pdata->dsp_prm_rmw_bits)(OMAP3430_RST1_IVA2_MASK, OMAP3430_RST1_IVA2_MASK, OMAP3430_IVA2_MOD, OMAP2_RM_RSTCTRL); /* Mask address with 1K for compatibility */ __raw_writel(dsp_addr & OMAP3_IVA2_BOOTADDR_MASK, - OMAP343X_CTRL_REGADDR( - OMAP343X_CONTROL_IVA2_BOOTADDR)); + ctrl + OMAP343X_CONTROL_IVA2_BOOTADDR); /* * Set bootmode to self loop if dsp_debug flag is true */ __raw_writel((dsp_debug) ? OMAP3_IVA2_BOOTMOD_IDLE : 0, - OMAP343X_CTRL_REGADDR( - OMAP343X_CONTROL_IVA2_BOOTMOD)); + ctrl + OMAP343X_CONTROL_IVA2_BOOTMOD); + + iounmap(ctrl); } } if (!status) { diff --git a/drivers/staging/tidspbridge/core/wdt.c b/drivers/staging/tidspbridge/core/wdt.c index 70055c8111ed..870f934f4f3b 100644 --- a/drivers/staging/tidspbridge/core/wdt.c +++ b/drivers/staging/tidspbridge/core/wdt.c @@ -53,7 +53,10 @@ int dsp_wdt_init(void) int ret = 0; dsp_wdt.sm_wdt = NULL; - dsp_wdt.reg_base = OMAP2_L4_IO_ADDRESS(OMAP34XX_WDT3_BASE); + dsp_wdt.reg_base = ioremap(OMAP34XX_WDT3_BASE, SZ_4K); + if (!dsp_wdt.reg_base) + return -ENOMEM; + tasklet_init(&dsp_wdt.wdt3_tasklet, dsp_wdt_dpc, 0); dsp_wdt.fclk = clk_get(NULL, "wdt3_fck"); @@ -99,6 +102,9 @@ void dsp_wdt_exit(void) dsp_wdt.fclk = NULL; dsp_wdt.iclk = NULL; dsp_wdt.sm_wdt = NULL; + + if (dsp_wdt.reg_base) + iounmap(dsp_wdt.reg_base); dsp_wdt.reg_base = NULL; } -- cgit v1.2.3 From 349ae79c0a3db1632ac4db955c53db05fc017bde Mon Sep 17 00:00:00 2001 From: Seth Jennings Date: Mon, 23 Apr 2012 20:33:50 -0500 Subject: staging: zcache: fix Kconfig crypto dependency ZCACHE is a boolean in the Kconfig. When selected, it should require that CRYPTO be builtin (=y). Currently, ZCACHE=y and CRYPTO=m is a valid configuration when it should not be. This patch changes the zcache Kconfig to enforce this dependency. Signed-off-by: Seth Jennings Acked-by: Konrad Rzeszutek Wilk Signed-off-by: Greg Kroah-Hartman --- drivers/staging/zcache/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/staging/zcache/Kconfig b/drivers/staging/zcache/Kconfig index 3ed2c8f656a5..7048e01f0817 100644 --- a/drivers/staging/zcache/Kconfig +++ b/drivers/staging/zcache/Kconfig @@ -2,7 +2,7 @@ config ZCACHE bool "Dynamic compression of swap pages and clean pagecache pages" # X86 dependency is because zsmalloc uses non-portable pte/tlb # functions - depends on (CLEANCACHE || FRONTSWAP) && CRYPTO && X86 + depends on (CLEANCACHE || FRONTSWAP) && CRYPTO=y && X86 select ZSMALLOC select CRYPTO_LZO default n -- cgit v1.2.3 From dc890df0a77cafe5f4a3d81c0dade637c27f1934 Mon Sep 17 00:00:00 2001 From: Imre Kaloz Date: Thu, 19 Apr 2012 12:27:27 +0200 Subject: staging: octeon-ethernet: fix build errors by including interrupt.h This patch fixes the following build failures: drivers/staging/octeon/ethernet.c: In function 'cvm_oct_cleanup_module': drivers/staging/octeon/ethernet.c:799:2: error: implicit declaration of function 'free_irq' drivers/staging/octeon/ethernet-rx.c: In function 'cvm_oct_no_more_work': drivers/staging/octeon/ethernet-rx.c:119:3: error: implicit declaration of function 'enable_irq' drivers/staging/octeon/ethernet-rx.c: In function 'cvm_oct_do_interrupt': drivers/staging/octeon/ethernet-rx.c:136:2: error: implicit declaration of function 'disable_irq_nosync' drivers/staging/octeon/ethernet-rx.c: In function 'cvm_oct_rx_initialize': drivers/staging/octeon/ethernet-rx.c:532:2: error: implicit declaration of function 'request_irq' drivers/staging/octeon/ethernet-tx.c: In function 'cvm_oct_tx_initialize': drivers/staging/octeon/ethernet-tx.c:712:2: error: implicit declaration of function 'request_irq' drivers/staging/octeon/ethernet-tx.c: In function 'cvm_oct_tx_shutdown': drivers/staging/octeon/ethernet-tx.c:723:2: error: implicit declaration of function 'free_irq' Signed-off-by: Imre Kaloz Acked-by: David Daney Signed-off-by: Greg Kroah-Hartman --- drivers/staging/octeon/ethernet-rx.c | 1 + drivers/staging/octeon/ethernet-tx.c | 1 + drivers/staging/octeon/ethernet.c | 1 + 3 files changed, 3 insertions(+) (limited to 'drivers') diff --git a/drivers/staging/octeon/ethernet-rx.c b/drivers/staging/octeon/ethernet-rx.c index 400df8cbee53..d91751f9ffe8 100644 --- a/drivers/staging/octeon/ethernet-rx.c +++ b/drivers/staging/octeon/ethernet-rx.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #ifdef CONFIG_XFRM #include diff --git a/drivers/staging/octeon/ethernet-tx.c b/drivers/staging/octeon/ethernet-tx.c index 56d74dc2fbd5..91a97b3e45c6 100644 --- a/drivers/staging/octeon/ethernet-tx.c +++ b/drivers/staging/octeon/ethernet-tx.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #ifdef CONFIG_XFRM #include diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c index 9112cd882154..60cba8194de3 100644 --- a/drivers/staging/octeon/ethernet.c +++ b/drivers/staging/octeon/ethernet.c @@ -31,6 +31,7 @@ #include #include #include +#include #include -- cgit v1.2.3 From 89f21cc050d5eed8eeffee5b46297fb7a74ef9dd Mon Sep 17 00:00:00 2001 From: Rupesh Gujare Date: Wed, 25 Apr 2012 23:54:58 +0100 Subject: staging: ozwpan: Fix bug where kfree is called twice. Signed-off-by: Rupesh Gujare Signed-off-by: Chris Kelly Signed-off-by: Greg Kroah-Hartman --- drivers/staging/ozwpan/ozpd.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'drivers') diff --git a/drivers/staging/ozwpan/ozpd.c b/drivers/staging/ozwpan/ozpd.c index 2b45d3d1800c..04cd57f2a6da 100644 --- a/drivers/staging/ozwpan/ozpd.c +++ b/drivers/staging/ozwpan/ozpd.c @@ -383,8 +383,6 @@ static void oz_tx_frame_free(struct oz_pd *pd, struct oz_tx_frame *f) pd->tx_pool = &f->link; pd->tx_pool_count++; f = 0; - } else { - kfree(f); } spin_unlock_bh(&pd->tx_frame_lock); if (f) -- cgit v1.2.3