* [PATCH v2] serial: xilinx_uartps: kill CONFIG_OF conditional
@ 2012-11-05 21:24 Josh Cartwright
2012-11-07 13:04 ` Michal Simek
0 siblings, 1 reply; 3+ messages in thread
From: Josh Cartwright @ 2012-11-05 21:24 UTC (permalink / raw)
To: Michal Simek; +Cc: Alan Cox, Greg Kroah-Hartman, linux-serial, linux-kernel
The Zynq platform requires the use of CONFIG_OF. Remove the #ifdef
conditionals in the uartps driver. Make dependency explicit in Kconfig.
Signed-off-by: Josh Cartwright <josh.cartwright@ni.com>
---
Michal-
Here's a version of this patch outside of my COMMON_CLK patchset as you
requested ontop of your arm-next branch. An explicit dependency was
added in Kconfig as you had suggested.
Thanks,
Josh
drivers/tty/serial/Kconfig | 1 +
drivers/tty/serial/xilinx_uartps.c | 9 ---------
2 files changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
index 2a53be5..8cb29b5 100644
--- a/drivers/tty/serial/Kconfig
+++ b/drivers/tty/serial/Kconfig
@@ -1376,6 +1376,7 @@ config SERIAL_MXS_AUART_CONSOLE
config SERIAL_XILINX_PS_UART
tristate "Xilinx PS UART support"
+ depends on OF
select SERIAL_CORE
help
This driver supports the Xilinx PS UART port.
diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
index b627363..23efe17 100644
--- a/drivers/tty/serial/xilinx_uartps.c
+++ b/drivers/tty/serial/xilinx_uartps.c
@@ -946,15 +946,11 @@ static int __devinit xuartps_probe(struct platform_device *pdev)
struct resource *res, *res2;
int clk = 0;
-#ifdef CONFIG_OF
const unsigned int *prop;
prop = of_get_property(pdev->dev.of_node, "clock", NULL);
if (prop)
clk = be32_to_cpup(prop);
-#else
- clk = *((unsigned int *)(pdev->dev.platform_data));
-#endif
if (!clk) {
dev_err(&pdev->dev, "no clock specified\n");
return -ENODEV;
@@ -1044,16 +1040,11 @@ static int xuartps_resume(struct platform_device *pdev)
}
/* Match table for of_platform binding */
-
-#ifdef CONFIG_OF
static struct of_device_id xuartps_of_match[] __devinitdata = {
{ .compatible = "xlnx,xuartps", },
{}
};
MODULE_DEVICE_TABLE(of, xuartps_of_match);
-#else
-#define xuartps_of_match NULL
-#endif
static struct platform_driver xuartps_platform_driver = {
.probe = xuartps_probe, /* Probe method */
--
1.8.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] serial: xilinx_uartps: kill CONFIG_OF conditional
2012-11-05 21:24 [PATCH v2] serial: xilinx_uartps: kill CONFIG_OF conditional Josh Cartwright
@ 2012-11-07 13:04 ` Michal Simek
2012-11-12 12:23 ` Michal Simek
0 siblings, 1 reply; 3+ messages in thread
From: Michal Simek @ 2012-11-07 13:04 UTC (permalink / raw)
To: Josh Cartwright; +Cc: Alan Cox, Greg Kroah-Hartman, linux-serial, linux-kernel
2012/11/5 Josh Cartwright <josh.cartwright@ni.com>:
> The Zynq platform requires the use of CONFIG_OF. Remove the #ifdef
> conditionals in the uartps driver. Make dependency explicit in Kconfig.
>
> Signed-off-by: Josh Cartwright <josh.cartwright@ni.com>
> ---
> Michal-
>
> Here's a version of this patch outside of my COMMON_CLK patchset as you
> requested ontop of your arm-next branch. An explicit dependency was
> added in Kconfig as you had suggested.
>
> Thanks,
> Josh
>
> drivers/tty/serial/Kconfig | 1 +
> drivers/tty/serial/xilinx_uartps.c | 9 ---------
> 2 files changed, 1 insertion(+), 9 deletions(-)
Tested-by: Michal Simek <monstr@monstr.eu>
Alan: Can you please add this patch to your tree?
Thanks,
Michal
--
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] serial: xilinx_uartps: kill CONFIG_OF conditional
2012-11-07 13:04 ` Michal Simek
@ 2012-11-12 12:23 ` Michal Simek
0 siblings, 0 replies; 3+ messages in thread
From: Michal Simek @ 2012-11-12 12:23 UTC (permalink / raw)
To: Josh Cartwright; +Cc: Alan Cox, Greg Kroah-Hartman, linux-serial, linux-kernel
2012/11/7 Michal Simek <monstr@monstr.eu>:
> 2012/11/5 Josh Cartwright <josh.cartwright@ni.com>:
>> The Zynq platform requires the use of CONFIG_OF. Remove the #ifdef
>> conditionals in the uartps driver. Make dependency explicit in Kconfig.
>>
>> Signed-off-by: Josh Cartwright <josh.cartwright@ni.com>
>> ---
>> Michal-
>>
>> Here's a version of this patch outside of my COMMON_CLK patchset as you
>> requested ontop of your arm-next branch. An explicit dependency was
>> added in Kconfig as you had suggested.
>>
>> Thanks,
>> Josh
>>
>> drivers/tty/serial/Kconfig | 1 +
>> drivers/tty/serial/xilinx_uartps.c | 9 ---------
>> 2 files changed, 1 insertion(+), 9 deletions(-)
>
> Tested-by: Michal Simek <monstr@monstr.eu>
>
Greg: Can you please add this patch to your tree?
Thanks,
Michal
--
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-11-12 12:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-05 21:24 [PATCH v2] serial: xilinx_uartps: kill CONFIG_OF conditional Josh Cartwright
2012-11-07 13:04 ` Michal Simek
2012-11-12 12:23 ` Michal Simek
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).