FCC patch..really
--
All things come to those who wait. Some of us just have to wait a little longer...
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux 2.4 for PowerPC development tree
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.1115 -> 1.1116
# arch/ppc/8260_io/fcc_enet.c 1.15 -> 1.16
# arch/ppc/8260_io/Config.in 1.9 -> 1.10
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/08/26 [email protected] 1.1116
# Added ability to configure the 8260 clocks used by FCC ethernet. # --------------------------------------------
#
arch/ppc/8260_io/Config.in +49 -3
@@ -2,6 +2,16 @@ # MPC8260 Communication options # mainmenu_option next_comment + +comment 'MPC8260 Options' +bool 'Disable data cache' CONFIG_DCACHE_DISABLE +bool 'Use TMCNT for RTC' CONFIG_8260_RTC_TMCNT +bool 'Enable local RAM support' CONFIG_8260_LRAM +if [ "$CONFIG_8260_LRAM" = "y" ]; then + hex ' Local RAM base address' CONFIG_8260_LRAM_BASE 0xF7000000 + hex ' Local RAM size' CONFIG_8260_LRAM_SIZE 0x00800000 +fi + comment 'MPC8260 CPM Options' bool 'Enable SCC Console' CONFIG_SCC_CONSOLE if [ "$CONFIG_NET_ETHERNET" = "y" ]; then
@@ -19,8 +29,47 @@ bool 'CPM FCC Ethernet' CONFIG_FEC_ENET if [ "$CONFIG_FEC_ENET" = "y" ]; then bool 'Ethernet on FCC1' CONFIG_FCC1_ENET + if [ "$CONFIG_FCC1_ENET" = "y" ]; then + choice 'RX Clk Source' \ + "CLK9 CONFIG_FCC1_RXCLK_CLK9 \ + CLK10 CONFIG_FCC1_RXCLK_CLK10 \ + CLK11 CONFIG_FCC1_RXCLK_CLK11 \ + CLK12 CONFIG_FCC1_RXCLK_CLK12" CLK12 + choice 'TX Clk Source' \ + "CLK9 CONFIG_FCC1_TXCLK_CLK9 \ + CLK10 CONFIG_FCC1_TXCLK_CLK10 \ + CLK11 CONFIG_FCC1_TXCLK_CLK11 \ + CLK12 CONFIG_FCC1_TXCLK_CLK12" CLK11 + fi bool 'Ethernet on FCC2' CONFIG_FCC2_ENET + if [ "$CONFIG_FCC2_ENET" = "y" ]; then + choice 'RX Clk Source' \ + "CLK13 CONFIG_FCC2_RXCLK_CLK13 \ + CLK14 CONFIG_FCC2_RXCLK_CLK14 \ + CLK15 CONFIG_FCC2_RXCLK_CLK15 \ + CLK16 CONFIG_FCC2_RXCLK_CLK16" CLK13 + choice 'TX Clk Source' \ + "CLK13 CONFIG_FCC2_TXCLK_CLK13 \ + CLK14 CONFIG_FCC2_TXCLK_CLK14 \ + CLK15 CONFIG_FCC2_TXCLK_CLK15 \ + CLK16 CONFIG_FCC2_TXCLK_CLK16" CLK14 + fi bool 'Ethernet on FCC3' CONFIG_FCC3_ENET + if [ "$CONFIG_FCC3_ENET" = "y" ]; then + choice 'RX Clk Source' \ + "CLK13 CONFIG_FCC3_RXCLK_CLK13 \ + CLK14 CONFIG_FCC3_RXCLK_CLK14 \ + CLK15 CONFIG_FCC3_RXCLK_CLK15 \ + CLK16 CONFIG_FCC3_RXCLK_CLK16" CLK15 + choice 'TX Clk Source' \ + "CLK13 CONFIG_FCC3_TXCLK_CLK13 \ + CLK14 CONFIG_FCC3_TXCLK_CLK14 \ + CLK15 CONFIG_FCC3_TXCLK_CLK15 \ + CLK16 CONFIG_FCC3_TXCLK_CLK16" CLK16 + fi + + bool 'Force FCC Full-Duplex Mode' CONFIG_FCC_FULL_DUPLEX + bool 'Use MDIO for PHY configuration' CONFIG_USE_MDIO if [ "$CONFIG_USE_MDIO" = "y" ]; then choice 'Type of PHY' \
@@ -31,7 +80,4 @@ fi fi fi - -comment 'Generic MPC8260 Options' -bool 'Disable data cache' CONFIG_DCACHE_DISABLE endmenu
arch/ppc/8260_io/fcc_enet.c +109 -13
157 lines not on this page · raw message
Review
Quoted 2 lines · Allen Curtis
(quoted diff) +2
-0+ if [ "$CONFIG_FCC1_ENET" = "y" ]; then + choice 'RX Clk Source' \
Please don't do this.......it doesn't belong in the configuration file. There are more things unique to a board configuration than the clock routing. This belongs as a structure in a C file, selectable by board type (along with other board specific selections).
Thanks.
-- Dan
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 8 lines
Review
Quoted 3 lines
(quoted diff) +2
-0+ if [ "$CONFIG_FCC1_ENET" = "y" ]; then + choice 'RX Clk Source' \Please don't do this.......it doesn't belong in the configuration file. There are more things unique to a board configuration than the clock routing. This belongs as a structure in a C file, selectable by board type (along with other board specific selections).
This may not be the right implementation but I believe it is the right direction. Personally I am tired of looking at all the different board specific implementations and conditional compile statements. How can we accomplish the same thing without cluttering the code with platform stuff? I think there needs to be an effort to define the kernel features and have the configuration translate platform features into generic kernel features that can be used by everyone. It doesn't do anyone any good to make them splunk though the Linux source to find platform tweaks. (although it does help to keep us contractors employed)
I have another update that does the same thing with the MDIO lines per PHY ;)
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 2 lines · Allen Curtis
I have another update that does the same thing with the MDIO lines per PHY ;)
Please don't. This stuff doesn't belong in configuration files. There is nothing wrong with creating platform specific configuration in files that can be compiled and using a single configuration option and #define to make this happen. Cluttered configuration scripts are a source of error and headache.
-- Dan
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 11 lines
Quoted 2 lines
I have another update that does the same thing with the MDIO
lines per PHY
Quoted 1 line
;)
Please don't. This stuff doesn't belong in configuration files. There is nothing wrong with creating platform specific configuration in files that can be compiled and using a single configuration option and #define to
make this happen. Cluttered configuration scripts are a source of error and headache.
Ok but lets keep the #defines that control the FCC setup and put them into the platform headers. If the defines are not present then they will default to the "normal" configuration. Unfortunately with this method you are required to modify each platform configuration file instead of having it done as part of the configuration process. I am not sure which would be more error prone.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/