diff options
author | Dmitry Baryshkov <dbaryshkov@gmail.com> | 2008-12-09 00:35:08 +0300 |
---|---|---|
committer | Graeme Gregory <dp@xora.org.uk> | 2009-01-29 01:46:20 +0000 |
commit | f186c8103c9195eb53238c928fe03f7af1d43479 (patch) | |
tree | 1be5cb46bf7e480bfac63231c94534910eb34a89 /packages/kexecboot/linux-kexecboot-2.6.24/tosa/0046-patch-tc6393xb-cleanup.patch | |
parent | a1514b599c421d2816e25aabab8578b30303c4ab (diff) |
linux-kexecboot: support tosa
port patches from linux-rp-2.6.24 to linux-kexecboot to enable booting
on tosa.
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Diffstat (limited to 'packages/kexecboot/linux-kexecboot-2.6.24/tosa/0046-patch-tc6393xb-cleanup.patch')
-rw-r--r-- | packages/kexecboot/linux-kexecboot-2.6.24/tosa/0046-patch-tc6393xb-cleanup.patch | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/packages/kexecboot/linux-kexecboot-2.6.24/tosa/0046-patch-tc6393xb-cleanup.patch b/packages/kexecboot/linux-kexecboot-2.6.24/tosa/0046-patch-tc6393xb-cleanup.patch new file mode 100644 index 0000000000..c4b57cb2d1 --- /dev/null +++ b/packages/kexecboot/linux-kexecboot-2.6.24/tosa/0046-patch-tc6393xb-cleanup.patch @@ -0,0 +1,66 @@ +From edaab7ec86235871d8ad219a1d225ce12f67f8af Mon Sep 17 00:00:00 2001 +From: Dmitry Baryshkov <dbaryshkov@gmail.com> +Date: Wed, 9 Jan 2008 02:13:29 +0300 +Subject: [PATCH 46/64] patch tc6393xb-cleanup + +--- + drivers/mfd/tc6393xb.c | 20 ++++++++++++-------- + 1 files changed, 12 insertions(+), 8 deletions(-) + +diff --git a/drivers/mfd/tc6393xb.c b/drivers/mfd/tc6393xb.c +index 5d17687..dfae61d 100644 +--- a/drivers/mfd/tc6393xb.c ++++ b/drivers/mfd/tc6393xb.c +@@ -590,16 +590,8 @@ static int tc6393xb_hw_init(struct platform_device *dev, int resume) + struct tc6393xb_platform_data *tcpd = dev->dev.platform_data; + struct tc6393xb *tc6393xb = platform_get_drvdata(dev); + struct tc6393xb_scr __iomem *scr = tc6393xb->scr; +- int ret; + int i; + +- if (resume) +- ret = tcpd->resume(dev); +- else +- ret = tcpd->enable(dev); +- if (ret) +- return ret; +- + iowrite8(resume ? + tc6393xb->suspend_state.fer.raw : + 0, &scr->fer); +@@ -664,6 +656,10 @@ static int __devinit tc6393xb_probe(struct platform_device *dev) + goto err_ioremap; + } + ++ retval = tcpd->enable(dev); ++ if (retval) ++ goto err_enable; ++ + retval = tc6393xb_hw_init(dev, 0); + if (retval) + goto err_hw_init; +@@ -690,6 +686,8 @@ static int __devinit tc6393xb_probe(struct platform_device *dev) + tc6393xb_detach_irq(dev); + + err_hw_init: ++ tcpd->disable(dev); ++err_enable: + iounmap(tc6393xb->scr); + err_ioremap: + release_resource(rscr); +@@ -743,6 +741,12 @@ static int tc6393xb_suspend(struct platform_device *dev, pm_message_t state) + + static int tc6393xb_resume(struct platform_device *dev) + { ++ struct tc6393xb_platform_data *tcpd = dev->dev.platform_data; ++ int ret = tcpd->resume(dev); ++ ++ if (ret) ++ return ret; ++ + return tc6393xb_hw_init(dev, 1); + } + #else +-- +1.5.3.8 + |