linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] IDE: palm_bk3710: use ioremap instead of arch-specific IO_ADDRESS()
@ 2009-01-30 19:59 Kevin Hilman
  2009-01-30 20:03 ` Sergei Shtylyov
  0 siblings, 1 reply; 3+ messages in thread
From: Kevin Hilman @ 2009-01-30 19:59 UTC (permalink / raw)
  To: linux-ide; +Cc: davinci-linux-open-source, Sergei Shtylyov

Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
---
 drivers/ide/palm_bk3710.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/ide/palm_bk3710.c b/drivers/ide/palm_bk3710.c
index f38aac7..6196f76 100644
--- a/drivers/ide/palm_bk3710.c
+++ b/drivers/ide/palm_bk3710.c
@@ -347,7 +347,7 @@ static int __init palm_bk3710_probe(struct platform_device *pdev)
 	struct clk *clk;
 	struct resource *mem, *irq;
 	void __iomem *base;
-	unsigned long rate;
+	unsigned long rate, mem_size;
 	int i, rc;
 	hw_regs_t hw, *hws[] = { &hw, NULL, NULL, NULL };
 
@@ -374,13 +374,19 @@ static int __init palm_bk3710_probe(struct platform_device *pdev)
 		return -ENODEV;
 	}
 
-	if (request_mem_region(mem->start, mem->end - mem->start + 1,
+	mem_size = mem->end - mem->start + 1;
+	if (request_mem_region(mem->start, mem_size,
 			       "palm_bk3710") == NULL) {
 		printk(KERN_ERR "failed to request memory region\n");
 		return -EBUSY;
 	}
 
-	base = IO_ADDRESS(mem->start);
+	base = ioremap(mem->start, mem_size);
+	if (!base) {
+		printk(KERN_ERR "failed to map IO memory\n");
+		release_mem_region(mem->start, mem_size);
+		return -ENOMEM;
+	}
 
 	/* Configure the Palm Chip controller */
 	palm_bk3710_chipinit(base);
-- 
1.6.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] IDE: palm_bk3710: use ioremap instead of arch-specific IO_ADDRESS()
  2009-01-30 19:59 [PATCH v2] IDE: palm_bk3710: use ioremap instead of arch-specific IO_ADDRESS() Kevin Hilman
@ 2009-01-30 20:03 ` Sergei Shtylyov
  2009-02-01 16:03   ` Bartlomiej Zolnierkiewicz
  0 siblings, 1 reply; 3+ messages in thread
From: Sergei Shtylyov @ 2009-01-30 20:03 UTC (permalink / raw)
  To: Kevin Hilman; +Cc: linux-ide, davinci-linux-open-source

Kevin Hilman wrote:

> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>

> diff --git a/drivers/ide/palm_bk3710.c b/drivers/ide/palm_bk3710.c
> index f38aac7..6196f76 100644
> --- a/drivers/ide/palm_bk3710.c
> +++ b/drivers/ide/palm_bk3710.c
> @@ -347,7 +347,7 @@ static int __init palm_bk3710_probe(struct platform_device *pdev)
>  	struct clk *clk;
>  	struct resource *mem, *irq;
>  	void __iomem *base;
> -	unsigned long rate;
> +	unsigned long rate, mem_size;
>  	int i, rc;
>  	hw_regs_t hw, *hws[] = { &hw, NULL, NULL, NULL };
>  
> @@ -374,13 +374,19 @@ static int __init palm_bk3710_probe(struct platform_device *pdev)
>  		return -ENODEV;
>  	}
>  
> -	if (request_mem_region(mem->start, mem->end - mem->start + 1,
> +	mem_size = mem->end - mem->start + 1;
> +	if (request_mem_region(mem->start, mem_size,
>  			       "palm_bk3710") == NULL) {

    No point in keeping *if* occupying 2 lines, I think...

MBR, Sergei


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] IDE: palm_bk3710: use ioremap instead of arch-specific IO_ADDRESS()
  2009-01-30 20:03 ` Sergei Shtylyov
@ 2009-02-01 16:03   ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 3+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2009-02-01 16:03 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: Kevin Hilman, linux-ide, davinci-linux-open-source

On Friday 30 January 2009, Sergei Shtylyov wrote:
> Kevin Hilman wrote:
> 
> > Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
> 
> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>

applied

[ yay, this driver builds on x86 again :) ]

> > diff --git a/drivers/ide/palm_bk3710.c b/drivers/ide/palm_bk3710.c
> > index f38aac7..6196f76 100644
> > --- a/drivers/ide/palm_bk3710.c
> > +++ b/drivers/ide/palm_bk3710.c
> > @@ -347,7 +347,7 @@ static int __init palm_bk3710_probe(struct platform_device *pdev)
> >  	struct clk *clk;
> >  	struct resource *mem, *irq;
> >  	void __iomem *base;
> > -	unsigned long rate;
> > +	unsigned long rate, mem_size;
> >  	int i, rc;
> >  	hw_regs_t hw, *hws[] = { &hw, NULL, NULL, NULL };
> >  
> > @@ -374,13 +374,19 @@ static int __init palm_bk3710_probe(struct platform_device *pdev)
> >  		return -ENODEV;
> >  	}
> >  
> > -	if (request_mem_region(mem->start, mem->end - mem->start + 1,
> > +	mem_size = mem->end - mem->start + 1;
> > +	if (request_mem_region(mem->start, mem_size,
> >  			       "palm_bk3710") == NULL) {
> 
>     No point in keeping *if* occupying 2 lines, I think...

I fixed it while merging the patch.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-02-01 17:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-30 19:59 [PATCH v2] IDE: palm_bk3710: use ioremap instead of arch-specific IO_ADDRESS() Kevin Hilman
2009-01-30 20:03 ` Sergei Shtylyov
2009-02-01 16:03   ` Bartlomiej Zolnierkiewicz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).