diff mbox

serial: samsung: Remove hard-coded major/minor numbers

Message ID 1388120848-15879-1-git-send-email-tushar.behera@linaro.org
State New
Headers show

Commit Message

Tushar Behera Dec. 27, 2013, 5:07 a.m. UTC
The hard-coded values clash with the values set for amba-pl011 serial
driver. Because of this there is no serial output on Samsung boards
if amba-pl011 is enabled alongwith samsung-serial driver.

Remove the hardcoded values and let the framework decide on
appropriate major/minor number. This is required for multi-platform
development work on Exynos platform.

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
---
 drivers/tty/serial/samsung.c |    4 ----
 1 file changed, 4 deletions(-)

Comments

Tushar Behera Dec. 27, 2013, 6:30 a.m. UTC | #1
On 27 December 2013 10:48, Greg KH <gregkh@linuxfoundation.org> wrote:
> On Fri, Dec 27, 2013 at 10:37:28AM +0530, Tushar Behera wrote:
>> The hard-coded values clash with the values set for amba-pl011 serial
>> driver. Because of this there is no serial output on Samsung boards
>> if amba-pl011 is enabled alongwith samsung-serial driver.
>>
>> Remove the hardcoded values and let the framework decide on
>> appropriate major/minor number. This is required for multi-platform
>> development work on Exynos platform.
>>
>> Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
>> ---
>>  drivers/tty/serial/samsung.c |    4 ----
>>  1 file changed, 4 deletions(-)
>>
>> diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c
>> index c1af04d..9c20543 100644
>> --- a/drivers/tty/serial/samsung.c
>> +++ b/drivers/tty/serial/samsung.c
>> @@ -56,8 +56,6 @@
>>  /* UART name and device definitions */
>>
>>  #define S3C24XX_SERIAL_NAME  "ttySAC"
>> -#define S3C24XX_SERIAL_MAJOR 204
>> -#define S3C24XX_SERIAL_MINOR 64
>>
>>  /* macros to change one thing to another */
>>
>> @@ -951,8 +949,6 @@ static struct uart_driver s3c24xx_uart_drv = {
>>       .nr             = CONFIG_SERIAL_SAMSUNG_UARTS,
>>       .cons           = S3C24XX_SERIAL_CONSOLE,
>>       .dev_name       = S3C24XX_SERIAL_NAME,
>> -     .major          = S3C24XX_SERIAL_MAJOR,
>> -     .minor          = S3C24XX_SERIAL_MINOR,
>
> Doesn't this break existing systems and configurations that are
> expecting 204:64 as the location of this serial port?
>

I tested this on Exynos4210-Origen, Exynos5250-Arndale board, it works
fine there. I haven't tested on any older boards.

> Why change this one and not the amba-pl011 driver?
>

I could only test this driver, so thought of changing this rather than
modifying amba-pl011 driver. I don't have any other reason.

> greg k-h


Thanks for reviewing.
Tushar Behera Dec. 27, 2013, 10:17 a.m. UTC | #2
On 27 December 2013 12:08, Greg KH <gregkh@linuxfoundation.org> wrote:
> On Fri, Dec 27, 2013 at 12:00:20PM +0530, Tushar Behera wrote:
>> On 27 December 2013 10:48, Greg KH <gregkh@linuxfoundation.org> wrote:
>> > On Fri, Dec 27, 2013 at 10:37:28AM +0530, Tushar Behera wrote:

[ ... ]

>> >> @@ -951,8 +949,6 @@ static struct uart_driver s3c24xx_uart_drv = {
>> >>       .nr             = CONFIG_SERIAL_SAMSUNG_UARTS,
>> >>       .cons           = S3C24XX_SERIAL_CONSOLE,
>> >>       .dev_name       = S3C24XX_SERIAL_NAME,
>> >> -     .major          = S3C24XX_SERIAL_MAJOR,
>> >> -     .minor          = S3C24XX_SERIAL_MINOR,
>> >
>> > Doesn't this break existing systems and configurations that are
>> > expecting 204:64 as the location of this serial port?
>> >
>>
>> I tested this on Exynos4210-Origen, Exynos5250-Arndale board, it works
>> fine there. I haven't tested on any older boards.
>
> How did it work?  You are relying on some userspace tools to do this
> properly, right?  What about systems without those specific tools?
>

Enabling CONFIG_DEVTMPFS, all the /dev/ttySAC<n> nodes are generated
and the appropriate console is specified through command line
argument.

>> > Why change this one and not the amba-pl011 driver?
>> >
>>
>> I could only test this driver, so thought of changing this rather than
>> modifying amba-pl011 driver. I don't have any other reason.
>
> Please get the samsung driver maintainer to agree with this and sign off
> on it before trying to get it merged again.
>
> greg k-h

Adding a few other developers who have contributed to this file or are
working on different Samsung platforms to get an ack/sign-off.
diff mbox

Patch

diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c
index c1af04d..9c20543 100644
--- a/drivers/tty/serial/samsung.c
+++ b/drivers/tty/serial/samsung.c
@@ -56,8 +56,6 @@ 
 /* UART name and device definitions */
 
 #define S3C24XX_SERIAL_NAME	"ttySAC"
-#define S3C24XX_SERIAL_MAJOR	204
-#define S3C24XX_SERIAL_MINOR	64
 
 /* macros to change one thing to another */
 
@@ -951,8 +949,6 @@  static struct uart_driver s3c24xx_uart_drv = {
 	.nr		= CONFIG_SERIAL_SAMSUNG_UARTS,
 	.cons		= S3C24XX_SERIAL_CONSOLE,
 	.dev_name	= S3C24XX_SERIAL_NAME,
-	.major		= S3C24XX_SERIAL_MAJOR,
-	.minor		= S3C24XX_SERIAL_MINOR,
 };
 
 static struct s3c24xx_uart_port s3c24xx_serial_ports[CONFIG_SERIAL_SAMSUNG_UARTS] = {