linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] remove obsolete arch/ppc/8xx_io/uart.c
       [not found] <1096517265.27208.18.camel@localhost.localdomain>
@ 2004-10-07 15:40 ` Tom Rini
  2004-10-07 16:00   ` Robert P. J. Day
  0 siblings, 1 reply; 13+ messages in thread
From: Tom Rini @ 2004-10-07 15:40 UTC (permalink / raw)
  To: Andreas Oberritter; +Cc: linuxppc-embedded

On Thu, Sep 30, 2004 at 06:07:45AM +0200, Andreas Oberritter wrote:

> Hi Dan,
> 
> this patch for linuxppc-2.5 removes the old uart driver which doesn't
> work since a long time and has already been replaced by
> drivers/serial/cpm_uart/*.

Can you please re-do this patch vs a linux-2.6 tree?  Thanks.

-- 
Tom Rini
http://gate.crashing.org/~trini/

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

* Re: [PATCH] remove obsolete arch/ppc/8xx_io/uart.c
  2004-10-07 15:40 ` [PATCH] remove obsolete arch/ppc/8xx_io/uart.c Tom Rini
@ 2004-10-07 16:00   ` Robert P. J. Day
  2004-10-07 16:47     ` Robert P. J. Day
  2004-10-07 17:30     ` Tom Rini
  0 siblings, 2 replies; 13+ messages in thread
From: Robert P. J. Day @ 2004-10-07 16:00 UTC (permalink / raw)
  To: Tom Rini; +Cc: linuxppc-embedded

On Thu, 7 Oct 2004, Tom Rini wrote:

> On Thu, Sep 30, 2004 at 06:07:45AM +0200, Andreas Oberritter wrote:
>
>> Hi Dan,
>>
>> this patch for linuxppc-2.5 removes the old uart driver which doesn't
>> work since a long time and has already been replaced by
>> drivers/serial/cpm_uart/*.
>
> Can you please re-do this patch vs a linux-2.6 tree?  Thanks.

at the risk of jumping on on this, this patch would be affected by the 
changes i made to Kconfig, and i've already listed (to myself) the 
changes that are represented by this fix.  (see previous post, in 
which i asked a few more annoying questions. :-)

if you want, i can throw together the patch for this.  as i see it, 
the changes are

   1) modify Kconfig to remove choice of "Use UART"
   2) modify Makefile to remove inclusion of uart.o
   3) remove uart.c entirely

is that about it?

rday

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

* Re: [PATCH] remove obsolete arch/ppc/8xx_io/uart.c
  2004-10-07 16:00   ` Robert P. J. Day
@ 2004-10-07 16:47     ` Robert P. J. Day
  2004-10-07 17:30     ` Tom Rini
  1 sibling, 0 replies; 13+ messages in thread
From: Robert P. J. Day @ 2004-10-07 16:47 UTC (permalink / raw)
  To: Embedded PPC Linux list

On Thu, 7 Oct 2004, Robert P. J. Day wrote:

> On Thu, 7 Oct 2004, Tom Rini wrote:
>
>> On Thu, Sep 30, 2004 at 06:07:45AM +0200, Andreas Oberritter wrote:
>> 
>>> Hi Dan,
>>> 
>>> this patch for linuxppc-2.5 removes the old uart driver which doesn't
>>> work since a long time and has already been replaced by
>>> drivers/serial/cpm_uart/*.
>> 
>> Can you please re-do this patch vs a linux-2.6 tree?  Thanks.
>
> at the risk of jumping on on this, this patch would be affected by the 
> changes i made to Kconfig, and i've already listed (to myself) the changes 
> that are represented by this fix.  (see previous post, in which i asked a few 
> more annoying questions. :-)
>
> if you want, i can throw together the patch for this.  as i see it, the 
> changes are
>
>  1) modify Kconfig to remove choice of "Use UART"
>  2) modify Makefile to remove inclusion of uart.o
>  3) remove uart.c entirely
>
> is that about it?

no, apparently, that's not it.  there is some significant conflict 
resolution to be done between a couple Kconfig submenus.  details to 
follow as i figure it out, provided i actually understand what i'm 
looking at.  definitely not as simple as i thought at first.

rday

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

* Re: [PATCH] remove obsolete arch/ppc/8xx_io/uart.c
  2004-10-07 16:00   ` Robert P. J. Day
  2004-10-07 16:47     ` Robert P. J. Day
@ 2004-10-07 17:30     ` Tom Rini
  2004-10-07 18:09       ` Robert P. J. Day
  1 sibling, 1 reply; 13+ messages in thread
From: Tom Rini @ 2004-10-07 17:30 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: linuxppc-embedded

On Thu, Oct 07, 2004 at 12:00:35PM -0400, Robert P. J. Day wrote:
> On Thu, 7 Oct 2004, Tom Rini wrote:
> >On Thu, Sep 30, 2004 at 06:07:45AM +0200, Andreas Oberritter wrote:
> >
> >>Hi Dan,
> >>
> >>this patch for linuxppc-2.5 removes the old uart driver which doesn't
> >>work since a long time and has already been replaced by
> >>drivers/serial/cpm_uart/*.
> >
> >Can you please re-do this patch vs a linux-2.6 tree?  Thanks.
> 
> at the risk of jumping on on this, this patch would be affected by the 
> changes i made to Kconfig, and i've already listed (to myself) the 
> changes that are represented by this fix.  (see previous post, in 
> which i asked a few more annoying questions. :-)

Since these changes can go right into a linux-2.6 tree and out to Linus,
I should be able to get BitKeeper to happily merge these changes and
your changes.

-- 
Tom Rini
http://gate.crashing.org/~trini/

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

* Re: [PATCH] remove obsolete arch/ppc/8xx_io/uart.c
  2004-10-07 17:30     ` Tom Rini
@ 2004-10-07 18:09       ` Robert P. J. Day
  2004-10-07 18:48         ` Tom Rini
  0 siblings, 1 reply; 13+ messages in thread
From: Robert P. J. Day @ 2004-10-07 18:09 UTC (permalink / raw)
  To: Tom Rini; +Cc: linuxppc-embedded

On Thu, 7 Oct 2004, Tom Rini wrote:

> Since these changes can go right into a linux-2.6 tree and out to 
> Linus, I should be able to get BitKeeper to happily merge these 
> changes and your changes.

since i already went to the trouble to figure out what it would take 
to do this, i'll just post it in case any of it is helpful.

first, i assume that anything related to UARTs in arch/ppc/8xx_io/ can 
be deleted (the newer stuff being in drivers/serial/cpm_uart/).  this 
would include uart.c, and any references to UARTs in both Kconfig and 
Makefile.  so that stuff is pretty easily deletable.

regarding Kconfig, that currently defines the following config 
variables related to UARTs (all of the latter ones dependent on the 
first, so if you delete the first, all the rest pretty well have to 
vanish as well):

   CONFIG_8xx_UART
   CONFIG_SMC2_UART
   CONFIG_ALTSMC2
   CONFIG_CONS_SMC2
   CONFIG_USE_SCC_IO

if you get rid of that chunk of Kconfig, then you better make sure 
there's nothing in the rest of the kernel source that refers to any of 
those config variables in any meaningful way.  other than uart.c, some 
of these variables are listed in arch/ppc/configs/*, so you'd probably 
want to clean up any of those defconfig files while you're at it.

(as an example, the file "SM850_defconfig" contains the line

   CONFIG_CONS_SMC2=y

not good. :-)

   now, once all that stuff is taken care of, i'm assuming all 
UART-related stuff and its configuration is found under 
drivers/serial/cpm_uart/, and the kernel config menu for that stuff 
under

   Device drivers ->
     Character devices ->
       Serial drivers

   apparently, according to this menu, i can walk through and select 
every single serial port possibility: SMC[12] and SCC[1234].  but even 
after you do that, you can apparently still go to the "MPC8xx" menu 
and select to put ethernet on, say, SCC1.  i'm pretty sure you 
shouldn't be able to select that SCC1 is for both UART and ethernet 
simultaneously.  just need to add more dependencies to some Kconfig 
files, i suspect.

   thoughts?

rday

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

* Re: [PATCH] remove obsolete arch/ppc/8xx_io/uart.c
  2004-10-07 18:09       ` Robert P. J. Day
@ 2004-10-07 18:48         ` Tom Rini
  2004-10-07 19:01           ` Robert P. J. Day
  2004-10-07 21:37           ` Dan Malek
  0 siblings, 2 replies; 13+ messages in thread
From: Tom Rini @ 2004-10-07 18:48 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: linuxppc-embedded

On Thu, Oct 07, 2004 at 02:09:05PM -0400, Robert P. J. Day wrote:

> On Thu, 7 Oct 2004, Tom Rini wrote:
> 
> >Since these changes can go right into a linux-2.6 tree and out to 
> >Linus, I should be able to get BitKeeper to happily merge these 
> >changes and your changes.
> 
> since i already went to the trouble to figure out what it would take 
> to do this, i'll just post it in case any of it is helpful.
> 
> first, i assume that anything related to UARTs in arch/ppc/8xx_io/ can 
> be deleted (the newer stuff being in drivers/serial/cpm_uart/).  this 
> would include uart.c, and any references to UARTs in both Kconfig and 
> Makefile.  so that stuff is pretty easily deletable.

Right.

> regarding Kconfig, that currently defines the following config 
> variables related to UARTs (all of the latter ones dependent on the 
> first, so if you delete the first, all the rest pretty well have to 
> vanish as well):
> 
>   CONFIG_8xx_UART
>   CONFIG_SMC2_UART
>   CONFIG_ALTSMC2
>   CONFIG_CONS_SMC2
>   CONFIG_USE_SCC_IO

Not all of these options exist in linux-2.6.

> if you get rid of that chunk of Kconfig, then you better make sure 
> there's nothing in the rest of the kernel source that refers to any of 
> those config variables in any meaningful way.  other than uart.c, some 
> of these variables are listed in arch/ppc/configs/*, so you'd probably 
> want to clean up any of those defconfig files while you're at it.

Leaving them in the defconfigs is fine.  In fact, unless you're going to
properly convert them to the CPM_UART versions, it's best to leave them.

[snip]
>   apparently, according to this menu, i can walk through and select 
> every single serial port possibility: SMC[12] and SCC[1234].  but even 
> after you do that, you can apparently still go to the "MPC8xx" menu 
> and select to put ethernet on, say, SCC1.  i'm pretty sure you 
> shouldn't be able to select that SCC1 is for both UART and ethernet 
> simultaneously.  just need to add more dependencies to some Kconfig 
> files, i suspect.

I think this had been discussed before, but perhaps not.  What should
happen at some point is something more like "Do you hae SMC1 ? What is
it? Do you have SMC2 ? What is it? Do youhave SCC1? What is it?" and so
on.  For now, I wouldn't worry about it.

-- 
Tom Rini
http://gate.crashing.org/~trini/

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

* Re: [PATCH] remove obsolete arch/ppc/8xx_io/uart.c
  2004-10-07 18:48         ` Tom Rini
@ 2004-10-07 19:01           ` Robert P. J. Day
  2004-10-07 21:37           ` Dan Malek
  1 sibling, 0 replies; 13+ messages in thread
From: Robert P. J. Day @ 2004-10-07 19:01 UTC (permalink / raw)
  To: Tom Rini; +Cc: linuxppc-embedded

On Thu, 7 Oct 2004, Tom Rini wrote:

> On Thu, Oct 07, 2004 at 02:09:05PM -0400, Robert P. J. Day wrote:

>> regarding Kconfig, that currently defines the following config
>> variables related to UARTs (all of the latter ones dependent on the
>> first, so if you delete the first, all the rest pretty well have to
>> vanish as well):
>>
>>   CONFIG_8xx_UART
>>   CONFIG_SMC2_UART
>>   CONFIG_ALTSMC2
>>   CONFIG_CONS_SMC2
>>   CONFIG_USE_SCC_IO
>
> Not all of these options exist in linux-2.6.


actually, that was my point -- once you remove that chunk of the 
Kconfig file, those variables disappear so nothing else in the source 
tree anywhere better depend on any of them.

i'm pretty sure we're agreeing here. :-)

rday

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

* Re: [PATCH] remove obsolete arch/ppc/8xx_io/uart.c
  2004-10-07 18:48         ` Tom Rini
  2004-10-07 19:01           ` Robert P. J. Day
@ 2004-10-07 21:37           ` Dan Malek
  2004-10-07 22:09             ` Tom Rini
  2004-10-07 22:27             ` Robert P. J. Day
  1 sibling, 2 replies; 13+ messages in thread
From: Dan Malek @ 2004-10-07 21:37 UTC (permalink / raw)
  To: Tom Rini; +Cc: linuxppc-embedded


On Oct 7, 2004, at 2:48 PM, Tom Rini wrote:

>>   CONFIG_8xx_UART
>>   CONFIG_SMC2_UART
>>   CONFIG_ALTSMC2
>>   CONFIG_CONS_SMC2
>>   CONFIG_USE_SCC_IO
>
> Not all of these options exist in linux-2.6.

Why not?  They must or some equivalent to get these features.
I dislike this 2.6 "forward progress" that continually removes
features we have deemed necessary in previous kernel versions.

> I think this had been discussed before, but perhaps not.  What should
> happen at some point is something more like "Do you hae SMC1 ? What is
> it? Do you have SMC2 ? What is it? Do youhave SCC1? What is it?" and so
> on.  For now, I wouldn't worry about it.

I don't understand the "what is it?" part of these questions.  As I
have continually pointed out over the years, we don't have "SMC" or
"SCC" drivers.  We have UART drivers that use SMCs or SCC, Ethernet
drivers that use SCCs or FECs, audio drivers that use SMCs or SCCs,
and so on.  It's a subtle but important configuration selection.  You
select the feature you want (uart, Ethernet, audio, ATM, etc.), then
you can be further prompted for peripheral routing information if 
necessary.
We have discussed this at length in the past.

Thanks.


	-- Dan

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

* Re: [PATCH] remove obsolete arch/ppc/8xx_io/uart.c
  2004-10-07 21:37           ` Dan Malek
@ 2004-10-07 22:09             ` Tom Rini
  2004-10-07 22:27             ` Robert P. J. Day
  1 sibling, 0 replies; 13+ messages in thread
From: Tom Rini @ 2004-10-07 22:09 UTC (permalink / raw)
  To: Dan Malek; +Cc: linuxppc-embedded

On Thu, Oct 07, 2004 at 05:37:06PM -0400, Dan Malek wrote:
> 
> On Oct 7, 2004, at 2:48 PM, Tom Rini wrote:
> 
> >>  CONFIG_8xx_UART
> >>  CONFIG_SMC2_UART
> >>  CONFIG_ALTSMC2
> >>  CONFIG_CONS_SMC2
> >>  CONFIG_USE_SCC_IO
> >
> >Not all of these options exist in linux-2.6.
> 
> Why not?  They must or some equivalent to get these features.
> I dislike this 2.6 "forward progress" that continually removes
> features we have deemed necessary in previous kernel versions.

Because some stuff to the now-dead uart driver never made it past
linuxppc-2.5.  Specifically I believe it was 8xx_UART that didn't.

> >I think this had been discussed before, but perhaps not.  What should
> >happen at some point is something more like "Do you hae SMC1 ? What is
> >it? Do you have SMC2 ? What is it? Do youhave SCC1? What is it?" and so
> >on.  For now, I wouldn't worry about it.
> 
> I don't understand the "what is it?" part of these questions.  As I
> have continually pointed out over the years, we don't have "SMC" or
> "SCC" drivers.

Right.  But we don't have ethernet and serial on SMC1.  What I was
talking about is we ask what driver should take care of SMC1, SMC2,
SCC1, and so on.  You could just be smart and not configure 2
drivers to use the same SMC or SCC as well.  What Robert was talking
about was making the system smart enough to not let you do it.  And
with 2.6 Kconfig syntax, this isn't as painful as it would have been
before.

-- 
Tom Rini
http://gate.crashing.org/~trini/

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

* Re: [PATCH] remove obsolete arch/ppc/8xx_io/uart.c
  2004-10-07 21:37           ` Dan Malek
  2004-10-07 22:09             ` Tom Rini
@ 2004-10-07 22:27             ` Robert P. J. Day
  2004-10-07 22:42               ` Tom Rini
  1 sibling, 1 reply; 13+ messages in thread
From: Robert P. J. Day @ 2004-10-07 22:27 UTC (permalink / raw)
  To: Dan Malek; +Cc: linuxppc-embedded

On Thu, 7 Oct 2004, Dan Malek wrote:

>
> On Oct 7, 2004, at 2:48 PM, Tom Rini wrote:
>
>>>   CONFIG_8xx_UART
>>>   CONFIG_SMC2_UART
>>>   CONFIG_ALTSMC2
>>>   CONFIG_CONS_SMC2
>>>   CONFIG_USE_SCC_IO
>> 
>> Not all of these options exist in linux-2.6.
>
> Why not?  They must or some equivalent to get these features. I 
> dislike this 2.6 "forward progress" that continually removes 
> features we have deemed necessary in previous kernel versions.

   actually, i was going to mention this very point earlier, but i got 
the impression that others were already all over this issue so i left 
it alone.

   in the current Kconfig file, you have the option of selecting which 
of SMC1 or SMC2 you want to be the console.  fair enough, and a useful 
feature to be sure.

   but if the UART-related stuff is removed from arch/ppc/8xx_io, then 
i'm assuming you'll do that configuration under the menu

   Device Drivers -->
     Character devices -->
       Serial drivers
         CPM SCC/SMC serial port support

at least, that's what it looks like.  but there's no equivalent 
selection to pick *exactly* where you want your console in that 
submenu.  i wasn't suggesting that all the above *features* had to be 
expunged -- just that those specific variables were related to the old 
UART way of doing things and had to be dealt with, one way or the 
other.

   obviously, new variables should be added to the new config part of 
the menu to add that functionality back in (the same names could, of 
course, be re-used).  as it stands, from what i can see by looking 
through the directory drivers/serial/cpm_uart, there is currently no 
way to select your console (among other things).

   before messing with any more code, i think someone has to sit down 
and just design the Kconfig menus that will represent all the features 
you want, with menus, submenus, variables, dependencies and so on.

   thoughts?

rday








>
>> I think this had been discussed before, but perhaps not.  What should
>> happen at some point is something more like "Do you hae SMC1 ? What is
>> it? Do you have SMC2 ? What is it? Do youhave SCC1? What is it?" and so
>> on.  For now, I wouldn't worry about it.
>
> I don't understand the "what is it?" part of these questions.  As I
> have continually pointed out over the years, we don't have "SMC" or
> "SCC" drivers.  We have UART drivers that use SMCs or SCC, Ethernet
> drivers that use SCCs or FECs, audio drivers that use SMCs or SCCs,
> and so on.  It's a subtle but important configuration selection.  You
> select the feature you want (uart, Ethernet, audio, ATM, etc.), then
> you can be further prompted for peripheral routing information if necessary.
> We have discussed this at length in the past.
>
> Thanks.
>
>
> 	-- Dan
>

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

* Re: [PATCH] remove obsolete arch/ppc/8xx_io/uart.c
  2004-10-07 22:27             ` Robert P. J. Day
@ 2004-10-07 22:42               ` Tom Rini
  2004-10-08  2:21                 ` Dan Malek
  0 siblings, 1 reply; 13+ messages in thread
From: Tom Rini @ 2004-10-07 22:42 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: linuxppc-embedded

On Thu, Oct 07, 2004 at 06:27:51PM -0400, Robert P. J. Day wrote:

> at least, that's what it looks like.  but there's no equivalent 
> selection to pick *exactly* where you want your console in that 
> submenu.  i wasn't suggesting that all the above *features* had to be 
> expunged -- just that those specific variables were related to the old 
> UART way of doing things and had to be dealt with, one way or the 
> other.

Oh, that.  console=ttyCPM1 is the answer if both SMC1 and SMC2 are
UARTs.

Anticipating Dan screaming about this, I'll point to the SH boards where
the first UART is wired up to odd connectors, and they don't do the "Is
console on uart1 ?" thing.

-- 
Tom Rini
http://gate.crashing.org/~trini/

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

* Re: [PATCH] remove obsolete arch/ppc/8xx_io/uart.c
  2004-10-07 22:42               ` Tom Rini
@ 2004-10-08  2:21                 ` Dan Malek
  2004-10-08 14:22                   ` Tom Rini
  0 siblings, 1 reply; 13+ messages in thread
From: Dan Malek @ 2004-10-08  2:21 UTC (permalink / raw)
  To: Tom Rini; +Cc: linuxppc-embedded


On Oct 7, 2004, at 6:42 PM, Tom Rini wrote:

> Oh, that.  console=ttyCPM1 is the answer if both SMC1 and SMC2 are
> UARTs.

Yeah, that's normally the way it's done.

> Anticipating Dan screaming about this,

What kind of a person do you think I am?  I don't scream about
anything.  I just point out facts and if others choose to ignore it
I'll just remind everyone later.

The original CPM uart drivers had lots of hard coded things
because the 'console=' option wasn't available at the time it
was developed.  It just was never updated when the command
line options appeared because the old config options were around.
It's also required information to the boards that use the 'simple'
zImage boot loader because there usually isn't any way for it
to know what to use as the console port.

The console= option is fine, it's used on many embedded boards,
including 8xx and 82xx when U-boot is used.  Just remember,
removing these console selection options from config will break
some things.  Be prepared to fix it, not just ignore it.

I'm most concerned with the Alternate SMC pin configurations, although
the new IO support functions that Kumar and I are looking at will
correct that.  Until those are done, you have to ensure there is
some way to 8xx parts with the small pin counts and the SMC pins
moved to work properly.


	-- Dan

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

* Re: [PATCH] remove obsolete arch/ppc/8xx_io/uart.c
  2004-10-08  2:21                 ` Dan Malek
@ 2004-10-08 14:22                   ` Tom Rini
  0 siblings, 0 replies; 13+ messages in thread
From: Tom Rini @ 2004-10-08 14:22 UTC (permalink / raw)
  To: Dan Malek; +Cc: linuxppc-embedded

On Thu, Oct 07, 2004 at 10:21:49PM -0400, Dan Malek wrote:
> 
> On Oct 7, 2004, at 6:42 PM, Tom Rini wrote:
> 
> >Oh, that.  console=ttyCPM1 is the answer if both SMC1 and SMC2 are
> >UARTs.
> 
> Yeah, that's normally the way it's done.
> 
> >Anticipating Dan screaming about this,
> 
> What kind of a person do you think I am?  I don't scream about
> anything.  I just point out facts and if others choose to ignore it
> I'll just remind everyone later.

I'm sorry Dan, I misjudged things.

-- 
Tom Rini
http://gate.crashing.org/~trini/

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

end of thread, other threads:[~2004-10-08 14:22 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1096517265.27208.18.camel@localhost.localdomain>
2004-10-07 15:40 ` [PATCH] remove obsolete arch/ppc/8xx_io/uart.c Tom Rini
2004-10-07 16:00   ` Robert P. J. Day
2004-10-07 16:47     ` Robert P. J. Day
2004-10-07 17:30     ` Tom Rini
2004-10-07 18:09       ` Robert P. J. Day
2004-10-07 18:48         ` Tom Rini
2004-10-07 19:01           ` Robert P. J. Day
2004-10-07 21:37           ` Dan Malek
2004-10-07 22:09             ` Tom Rini
2004-10-07 22:27             ` Robert P. J. Day
2004-10-07 22:42               ` Tom Rini
2004-10-08  2:21                 ` Dan Malek
2004-10-08 14:22                   ` Tom Rini

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).