Commit b47e6edf authored by Federico Vaga's avatar Federico Vaga

sw:drv: rename bootsel getter/setter to have a shorter name

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent d5576038
...@@ -210,8 +210,8 @@ static void spec_dbg_exit(struct spec_gn412x *spec_gn412x) ...@@ -210,8 +210,8 @@ static void spec_dbg_exit(struct spec_gn412x *spec_gn412x)
/* SPEC GPIO configuration */ /* SPEC GPIO configuration */
static void spec_gpio_fpga_select_set(struct spec_gn412x *spec_gn412x, static void spec_bootsel_set(struct spec_gn412x *spec_gn412x,
enum spec_fpga_select sel) enum spec_fpga_select sel)
{ {
switch (sel) { switch (sel) {
case SPEC_FPGA_SELECT_FPGA_FLASH: case SPEC_FPGA_SELECT_FPGA_FLASH:
...@@ -227,7 +227,7 @@ static void spec_gpio_fpga_select_set(struct spec_gn412x *spec_gn412x, ...@@ -227,7 +227,7 @@ static void spec_gpio_fpga_select_set(struct spec_gn412x *spec_gn412x,
} }
} }
static enum spec_fpga_select spec_gpio_fpga_select_get(struct spec_gn412x *spec_gn412x) static enum spec_fpga_select spec_bootsel_get(struct spec_gn412x *spec_gn412x)
{ {
enum spec_fpga_select sel = 0; enum spec_fpga_select sel = 0;
...@@ -556,9 +556,9 @@ static int spec_fw_load(struct spec_gn412x *spec_gn412x, const char *name) ...@@ -556,9 +556,9 @@ static int spec_fw_load(struct spec_gn412x *spec_gn412x, const char *name)
mutex_lock(&spec_gn412x->mtx); mutex_lock(&spec_gn412x->mtx);
sel = spec_gpio_fpga_select_get(spec_gn412x); sel = spec_bootsel_get(spec_gn412x);
spec_gpio_fpga_select_set(spec_gn412x, SPEC_FPGA_SELECT_GN4124_FPGA); spec_bootsel_set(spec_gn412x, SPEC_FPGA_SELECT_GN4124_FPGA);
err = compat_spec_fw_load(spec_gn412x, name); err = compat_spec_fw_load(spec_gn412x, name);
if (err) if (err)
...@@ -570,7 +570,7 @@ static int spec_fw_load(struct spec_gn412x *spec_gn412x, const char *name) ...@@ -570,7 +570,7 @@ static int spec_fw_load(struct spec_gn412x *spec_gn412x, const char *name)
"FPGA incorrectly programmed %d\n", err); "FPGA incorrectly programmed %d\n", err);
out: out:
spec_gpio_fpga_select_set(spec_gn412x, sel); spec_bootsel_set(spec_gn412x, sel);
mutex_unlock(&spec_gn412x->mtx); mutex_unlock(&spec_gn412x->mtx);
return err; return err;
...@@ -597,7 +597,7 @@ static ssize_t bootselect_store(struct device *dev, ...@@ -597,7 +597,7 @@ static ssize_t bootselect_store(struct device *dev,
} }
mutex_lock(&spec_gn412x->mtx); mutex_lock(&spec_gn412x->mtx);
spec_gpio_fpga_select_set(spec_gn412x, sel); spec_bootsel_set(spec_gn412x, sel);
mutex_unlock(&spec_gn412x->mtx); mutex_unlock(&spec_gn412x->mtx);
return count; return count;
...@@ -611,7 +611,7 @@ static ssize_t bootselect_show(struct device *dev, ...@@ -611,7 +611,7 @@ static ssize_t bootselect_show(struct device *dev,
struct spec_gn412x *spec_gn412x = pci_get_drvdata(pdev); struct spec_gn412x *spec_gn412x = pci_get_drvdata(pdev);
enum spec_fpga_select sel; enum spec_fpga_select sel;
sel = spec_gpio_fpga_select_get(spec_gn412x); sel = spec_bootsel_get(spec_gn412x);
switch (sel) { switch (sel) {
case SPEC_FPGA_SELECT_FPGA_FLASH: case SPEC_FPGA_SELECT_FPGA_FLASH:
return snprintf(buf, PAGE_SIZE, "fpga-flash\n"); return snprintf(buf, PAGE_SIZE, "fpga-flash\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment