diff options
author | Paul Menzel <paulepanter@users.sourceforge.net> | 2013-02-23 21:31:23 +0100 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2013-02-25 18:47:00 +0100 |
commit | 528640d141193b4aaeb6b8956d4fbc7381df9eb3 (patch) | |
tree | 98e9dfa7e912b8187600d1347f369a02598d56a3 /src/mainboard/amd | |
parent | 1fc7416545bde75d9cc401638f28ebfb751b663e (diff) | |
download | coreboot-528640d141193b4aaeb6b8956d4fbc7381df9eb3.tar.xz |
mainboard.c: Name enable_dev function uniformly `mainboard_enable`
To reduce the differences between these file name the enabling
device function in the directory `src/mainboard` uniformly
`mainboard_enable` [1].
Thanks to the awesome help of gnomon and BlastHardcheese in the
IRC channel #sed on <irc.freenode.net>. gnomon came up with the
following command to do the actual work.
$ cd src/mainboard
$ for f in */*/mainboard.c ; \
> do src="$(awk '/\.enable_dev = /{v=$NF; sub(/,$/,"",v); print v}' "$f")" ; \
> [[ -z $src ]] && continue ; \
> printf '%s\n' "g/${src}/s/${src}\([,(]\)/mainboard_enable\1/p" w | ed -s "$f" ; \
> done
`src/mainboard/digitallogic/msm586seg/mainboard.c` and
`src/mainboard/technologic/ts5300/mainboard.c` had to be adapted
manually as no comma was used separating the struct members.
And with the following statement, gnomon is even more likable!
My pleasure entirely. Good luck with coreboot; I'm a big fan of the project.
[1] http://www.coreboot.org/pipermail/coreboot/2013-February/074548.html
Change-Id: Ife9cd0c2d9cc1ed14afc6d40063450553f06a6c6
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: http://review.coreboot.org/2493
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/mainboard/amd')
-rw-r--r-- | src/mainboard/amd/bimini_fam10/mainboard.c | 4 | ||||
-rw-r--r-- | src/mainboard/amd/db800/mainboard.c | 4 | ||||
-rw-r--r-- | src/mainboard/amd/dbm690t/mainboard.c | 4 | ||||
-rw-r--r-- | src/mainboard/amd/dinar/mainboard.c | 4 | ||||
-rw-r--r-- | src/mainboard/amd/inagua/mainboard.c | 4 | ||||
-rw-r--r-- | src/mainboard/amd/mahogany/mainboard.c | 4 | ||||
-rw-r--r-- | src/mainboard/amd/mahogany_fam10/mainboard.c | 4 | ||||
-rw-r--r-- | src/mainboard/amd/norwich/mainboard.c | 4 | ||||
-rw-r--r-- | src/mainboard/amd/parmer/mainboard.c | 4 | ||||
-rw-r--r-- | src/mainboard/amd/persimmon/mainboard.c | 4 | ||||
-rw-r--r-- | src/mainboard/amd/pistachio/mainboard.c | 4 | ||||
-rw-r--r-- | src/mainboard/amd/rumba/mainboard.c | 4 | ||||
-rw-r--r-- | src/mainboard/amd/south_station/mainboard.c | 4 | ||||
-rw-r--r-- | src/mainboard/amd/thatcher/mainboard.c | 4 | ||||
-rw-r--r-- | src/mainboard/amd/tilapia_fam10/mainboard.c | 4 | ||||
-rw-r--r-- | src/mainboard/amd/torpedo/mainboard.c | 4 | ||||
-rw-r--r-- | src/mainboard/amd/union_station/mainboard.c | 4 |
17 files changed, 34 insertions, 34 deletions
diff --git a/src/mainboard/amd/bimini_fam10/mainboard.c b/src/mainboard/amd/bimini_fam10/mainboard.c index c9f0732b6f..46b4e211c9 100644 --- a/src/mainboard/amd/bimini_fam10/mainboard.c +++ b/src/mainboard/amd/bimini_fam10/mainboard.c @@ -123,7 +123,7 @@ static void get_ide_dma66(void) * enable the dedicated function in bimini board. * This function called early than rs780_enable. *************************************************/ -static void bimini_enable(device_t dev) +static void mainboard_enable(device_t dev) { printk(BIOS_INFO, "Mainboard BIMINI Enable. dev=0x%p\n", dev); @@ -133,5 +133,5 @@ static void bimini_enable(device_t dev) } struct chip_operations mainboard_ops = { - .enable_dev = bimini_enable, + .enable_dev = mainboard_enable, }; diff --git a/src/mainboard/amd/db800/mainboard.c b/src/mainboard/amd/db800/mainboard.c index e34990b918..0e19242194 100644 --- a/src/mainboard/amd/db800/mainboard.c +++ b/src/mainboard/amd/db800/mainboard.c @@ -26,11 +26,11 @@ static void init(struct device *dev) printk(BIOS_DEBUG, "AMD DB800 EXIT %s\n", __func__); } -static void enable_dev(struct device *dev) +static void mainboard_enable(struct device *dev) { dev->ops->init = init; } struct chip_operations mainboard_ops = { - .enable_dev = enable_dev, + .enable_dev = mainboard_enable, }; diff --git a/src/mainboard/amd/dbm690t/mainboard.c b/src/mainboard/amd/dbm690t/mainboard.c index 39475ce9bf..4355b6ba26 100644 --- a/src/mainboard/amd/dbm690t/mainboard.c +++ b/src/mainboard/amd/dbm690t/mainboard.c @@ -180,7 +180,7 @@ static void set_thermal_config(void) * enable the dedicated function in dbm690t board. * This function called early than rs690_enable. *************************************************/ -static void dbm690t_enable(device_t dev) +static void mainboard_enable(device_t dev) { printk(BIOS_INFO, "Mainboard DBM690T Enable. dev=0x%p\n", dev); @@ -190,5 +190,5 @@ static void dbm690t_enable(device_t dev) } struct chip_operations mainboard_ops = { - .enable_dev = dbm690t_enable, + .enable_dev = mainboard_enable, }; diff --git a/src/mainboard/amd/dinar/mainboard.c b/src/mainboard/amd/dinar/mainboard.c index ce9f2cac25..df5519bf64 100644 --- a/src/mainboard/amd/dinar/mainboard.c +++ b/src/mainboard/amd/dinar/mainboard.c @@ -68,11 +68,11 @@ void set_pcie_dereset(void *nbconfig) /************************************************* * enable the dedicated function in dinar board. *************************************************/ -static void dinar_enable(device_t dev) +static void mainboard_enable(device_t dev) { printk(BIOS_INFO, "Mainboard Dinar Enable. dev=0x%p\n", dev); } struct chip_operations mainboard_ops = { - .enable_dev = dinar_enable, + .enable_dev = mainboard_enable, }; diff --git a/src/mainboard/amd/inagua/mainboard.c b/src/mainboard/amd/inagua/mainboard.c index 9a5e00c2ad..2e2edc3478 100644 --- a/src/mainboard/amd/inagua/mainboard.c +++ b/src/mainboard/amd/inagua/mainboard.c @@ -73,7 +73,7 @@ void set_pcie_dereset(void) /************************************************* * enable the dedicated function in INAGUA board. *************************************************/ -static void inagua_enable(device_t dev) +static void mainboard_enable(device_t dev) { printk(BIOS_INFO, "Mainboard " CONFIG_MAINBOARD_PART_NUMBER " Enable.\n"); @@ -82,5 +82,5 @@ static void inagua_enable(device_t dev) } struct chip_operations mainboard_ops = { - .enable_dev = inagua_enable, + .enable_dev = mainboard_enable, }; diff --git a/src/mainboard/amd/mahogany/mainboard.c b/src/mainboard/amd/mahogany/mainboard.c index c8405fc65d..3ad3602b9d 100644 --- a/src/mainboard/amd/mahogany/mainboard.c +++ b/src/mainboard/amd/mahogany/mainboard.c @@ -97,7 +97,7 @@ u8 is_dev3_present(void) * enable the dedicated function in mahogany board. * This function called early than rs780_enable. *************************************************/ -static void mahogany_enable(device_t dev) +static void mainboard_enable(device_t dev) { printk(BIOS_INFO, "Mainboard MAHOGANY Enable. dev=0x%p\n", dev); @@ -106,5 +106,5 @@ static void mahogany_enable(device_t dev) } struct chip_operations mainboard_ops = { - .enable_dev = mahogany_enable, + .enable_dev = mainboard_enable, }; diff --git a/src/mainboard/amd/mahogany_fam10/mainboard.c b/src/mainboard/amd/mahogany_fam10/mainboard.c index f944bd31c5..c9e7160c47 100644 --- a/src/mainboard/amd/mahogany_fam10/mainboard.c +++ b/src/mainboard/amd/mahogany_fam10/mainboard.c @@ -98,7 +98,7 @@ u8 is_dev3_present(void) * enable the dedicated function in mahogany board. * This function called early than rs780_enable. *************************************************/ -static void mahogany_enable(device_t dev) +static void mainboard_enable(device_t dev) { printk(BIOS_INFO, "Mainboard MAHOGANY Enable. dev=0x%p\n", dev); @@ -107,5 +107,5 @@ static void mahogany_enable(device_t dev) } struct chip_operations mainboard_ops = { - .enable_dev = mahogany_enable, + .enable_dev = mainboard_enable, }; diff --git a/src/mainboard/amd/norwich/mainboard.c b/src/mainboard/amd/norwich/mainboard.c index 9002a57756..e0e9001d40 100644 --- a/src/mainboard/amd/norwich/mainboard.c +++ b/src/mainboard/amd/norwich/mainboard.c @@ -26,11 +26,11 @@ static void init(struct device *dev) printk(BIOS_DEBUG, "Norwich EXIT %s\n", __func__); } -static void enable_dev(struct device *dev) +static void mainboard_enable(struct device *dev) { dev->ops->init = init; } struct chip_operations mainboard_ops = { - .enable_dev = enable_dev, + .enable_dev = mainboard_enable, }; diff --git a/src/mainboard/amd/parmer/mainboard.c b/src/mainboard/amd/parmer/mainboard.c index 7c5dfc0443..4b22214ebc 100644 --- a/src/mainboard/amd/parmer/mainboard.c +++ b/src/mainboard/amd/parmer/mainboard.c @@ -32,7 +32,7 @@ /************************************************* * enable the dedicated function in parmer board. *************************************************/ -static void parmer_enable(device_t dev) +static void mainboard_enable(device_t dev) { printk(BIOS_INFO, "Mainboard " CONFIG_MAINBOARD_PART_NUMBER " Enable.\n"); /* @@ -47,5 +47,5 @@ static void parmer_enable(device_t dev) } struct chip_operations mainboard_ops = { - .enable_dev = parmer_enable, + .enable_dev = mainboard_enable, }; diff --git a/src/mainboard/amd/persimmon/mainboard.c b/src/mainboard/amd/persimmon/mainboard.c index 5edacd3ab6..2f7cfd12de 100644 --- a/src/mainboard/amd/persimmon/mainboard.c +++ b/src/mainboard/amd/persimmon/mainboard.c @@ -53,7 +53,7 @@ void set_pcie_dereset(void) /************************************************* * enable the dedicated function in persimmon board. *************************************************/ -static void persimmon_enable(device_t dev) +static void mainboard_enable(device_t dev) { printk(BIOS_INFO, "Mainboard " CONFIG_MAINBOARD_PART_NUMBER " Enable.\n"); @@ -76,5 +76,5 @@ static void persimmon_enable(device_t dev) } struct chip_operations mainboard_ops = { - .enable_dev = persimmon_enable, + .enable_dev = mainboard_enable, }; diff --git a/src/mainboard/amd/pistachio/mainboard.c b/src/mainboard/amd/pistachio/mainboard.c index f59e2bc59a..2b61ace46a 100644 --- a/src/mainboard/amd/pistachio/mainboard.c +++ b/src/mainboard/amd/pistachio/mainboard.c @@ -250,7 +250,7 @@ static void set_thermal_config(void) * enable the dedicated function in pistachio board. * This function called early than rs690_enable. *************************************************/ -static void pistachio_enable(device_t dev) +static void mainboard_enable(device_t dev) { printk(BIOS_INFO, "Mainboard Pistachio Enable. dev=0x%p\n", dev); @@ -259,5 +259,5 @@ static void pistachio_enable(device_t dev) } struct chip_operations mainboard_ops = { - .enable_dev = pistachio_enable, + .enable_dev = mainboard_enable, }; diff --git a/src/mainboard/amd/rumba/mainboard.c b/src/mainboard/amd/rumba/mainboard.c index 71d2d688ad..8c97109948 100644 --- a/src/mainboard/amd/rumba/mainboard.c +++ b/src/mainboard/amd/rumba/mainboard.c @@ -27,12 +27,12 @@ static void init(struct device *dev) printk(BIOS_DEBUG, "AMD RUMBA EXIT %s\n", __func__); } -static void enable_dev(struct device *dev) +static void mainboard_enable(struct device *dev) { dev->ops->init = init; } struct chip_operations mainboard_ops = { - .enable_dev = enable_dev, + .enable_dev = mainboard_enable, }; diff --git a/src/mainboard/amd/south_station/mainboard.c b/src/mainboard/amd/south_station/mainboard.c index 5f31e037a4..b7d8bea071 100644 --- a/src/mainboard/amd/south_station/mainboard.c +++ b/src/mainboard/amd/south_station/mainboard.c @@ -75,12 +75,12 @@ static void southstation_led_init(void) /************************************************* * enable the dedicated function in southstation board. *************************************************/ -static void southstation_enable(device_t dev) +static void mainboard_enable(device_t dev) { printk(BIOS_INFO, "Mainboard " CONFIG_MAINBOARD_PART_NUMBER " Enable.\n"); southstation_led_init(); } struct chip_operations mainboard_ops = { - .enable_dev = southstation_enable, + .enable_dev = mainboard_enable, }; diff --git a/src/mainboard/amd/thatcher/mainboard.c b/src/mainboard/amd/thatcher/mainboard.c index d1c389c0cd..655ff316e0 100644 --- a/src/mainboard/amd/thatcher/mainboard.c +++ b/src/mainboard/amd/thatcher/mainboard.c @@ -32,7 +32,7 @@ /************************************************* * enable the dedicated function in thatcher board. *************************************************/ -static void thatcher_enable(device_t dev) +static void mainboard_enable(device_t dev) { msr_t msr; @@ -64,5 +64,5 @@ static void thatcher_enable(device_t dev) } struct chip_operations mainboard_ops = { - .enable_dev = thatcher_enable, + .enable_dev = mainboard_enable, }; diff --git a/src/mainboard/amd/tilapia_fam10/mainboard.c b/src/mainboard/amd/tilapia_fam10/mainboard.c index 79fdbc26c7..f9598b9745 100644 --- a/src/mainboard/amd/tilapia_fam10/mainboard.c +++ b/src/mainboard/amd/tilapia_fam10/mainboard.c @@ -273,7 +273,7 @@ static void set_thermal_config(void) * enable the dedicated function in tilapia board. * This function called early than rs780_enable. *************************************************/ -static void tilapia_enable(device_t dev) +static void mainboard_enable(device_t dev) { printk(BIOS_INFO, "Mainboard TILAPIA Enable. dev=0x%p\n", dev); @@ -284,5 +284,5 @@ static void tilapia_enable(device_t dev) } struct chip_operations mainboard_ops = { - .enable_dev = tilapia_enable, + .enable_dev = mainboard_enable, }; diff --git a/src/mainboard/amd/torpedo/mainboard.c b/src/mainboard/amd/torpedo/mainboard.c index d0f3f2bfe5..b7a59a0912 100644 --- a/src/mainboard/amd/torpedo/mainboard.c +++ b/src/mainboard/amd/torpedo/mainboard.c @@ -52,11 +52,11 @@ void set_pcie_dereset(void) /************************************************* * enable the dedicated function in torpedo board. *************************************************/ -static void torpedo_enable(device_t dev) +static void mainboard_enable(device_t dev) { printk(BIOS_INFO, "Mainboard " CONFIG_MAINBOARD_PART_NUMBER " Enable. dev=0x%p\n", dev); } struct chip_operations mainboard_ops = { - .enable_dev = torpedo_enable, + .enable_dev = mainboard_enable, }; diff --git a/src/mainboard/amd/union_station/mainboard.c b/src/mainboard/amd/union_station/mainboard.c index 063f9b4f0e..57dfe4423c 100644 --- a/src/mainboard/amd/union_station/mainboard.c +++ b/src/mainboard/amd/union_station/mainboard.c @@ -49,11 +49,11 @@ void set_pcie_dereset(void) /************************************************* * enable the dedicated function in unionstation board. *************************************************/ -static void unionstation_enable(device_t dev) +static void mainboard_enable(device_t dev) { printk(BIOS_INFO, "Mainboard " CONFIG_MAINBOARD_PART_NUMBER " Enable.\n"); } struct chip_operations mainboard_ops = { - .enable_dev = unionstation_enable, + .enable_dev = mainboard_enable, }; |