remove obsolete arch/ppc/8xx_io/uart.c
Quoted 5 lines · Andreas Oberritter
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.
Signature · 2 lines
Tom Rini http://gate.crashing.org/~trini/
Quoted 9 lines · Tom Rini
Quoted 5 lines · Andreas Oberritter
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
Quoted 14 lines · Robert P. J. Day
Quoted 9 lines · Tom Rini
Quoted 5 lines · Andreas Oberritter
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. :-)
Quoted 7 lines
if you want, i can throw together the patch for this. as i see it, the changes are
1) modify
Kconfigto remove choice of "Use UART"
2) modifyMakefileto remove inclusion of uart.o
3) removeuart.centirelyis 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
Quoted 9 lines · Robert P. J. Day
Quoted 8 lines · Tom Rini
Quoted 5 lines · Andreas Oberritter
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/*.
Quoted 6 lines
Quoted 1 line
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.
Signature · 2 lines
Tom Rini http://gate.crashing.org/~trini/
Quoted 1 line · Tom Rini
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
Quoted 6 lines · Robert P. J. Day
Quoted 3 lines · Tom Rini
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.
Quoted 7 lines
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 indrivers/serial/cpm_uart/). this would includeuart.c, and any references to UARTs in bothKconfigandMakefile. so that stuff is pretty easily deletable.
Right.
Quoted 10 lines
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.
Quoted 5 lines
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 thanuart.c, some of these variables are listed inarch/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]
Quoted 7 lines
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 someKconfigfiles, 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.
Signature · 2 lines
Tom Rini http://gate.crashing.org/~trini/
Quoted 7 lines · Tom Rini
Quoted 5 lines · Robert P. J. Day
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):
Quoted 7 lines
Quoted 5 lines
CONFIG_8xx_UART
CONFIG_SMC2_UART
CONFIG_ALTSMC2
CONFIG_CONS_SMC2
CONFIG_USE_SCC_IONot 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
Quoted 7 lines · Tom Rini
Quoted 5 lines
CONFIG_8xx_UART
CONFIG_SMC2_UART
CONFIG_ALTSMC2
CONFIG_CONS_SMC2
CONFIG_USE_SCC_IONot 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.
Quoted 4 lines
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
Quoted 9 lines · Dan Malek
Quoted 6 lines · Tom Rini
Quoted 5 lines
CONFIG_8xx_UART
CONFIG_SMC2_UART
CONFIG_ALTSMC2
CONFIG_CONS_SMC2
CONFIG_USE_SCC_IO
Quoted 5 lines
Quoted 1 line
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.
Quoted 8 lines
Quoted 4 lines
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.
Signature · 2 lines
Tom Rini http://gate.crashing.org/~trini/
Quoted 9 lines · Dan Malek
Quoted 6 lines · Tom Rini
Quoted 5 lines
CONFIG_8xx_UART
CONFIG_SMC2_UART
CONFIG_ALTSMC2
CONFIG_CONS_SMC2
CONFIG_USE_SCC_IO
Quoted 3 lines
Quoted 1 line
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
Quoted 20 lines
Quoted 5 lines
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
Quoted 6 lines · Robert P. J. Day
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.
Signature · 2 lines
Tom Rini http://gate.crashing.org/~trini/
Quoted 2 lines · Tom Rini
Oh, that. console=ttyCPM1 is the answer if both SMC1 and SMC2 are UARTs.
Yeah, that's normally the way it's done.
Quoted 1 line
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
Quoted 6 lines · Dan Malek
Quoted 2 lines · Tom Rini
Oh, that. console=ttyCPM1 is the answer if both SMC1 and SMC2 are UARTs.
Quoted 7 lines
Yeah, that's normally the way it's done.
Quoted 1 line
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.
Signature · 2 lines
Tom Rini http://gate.crashing.org/~trini/