summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/soc/amd/stoneyridge/gpio.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/soc/amd/stoneyridge/gpio.c b/src/soc/amd/stoneyridge/gpio.c
index 88e7d3be19..b4b7acfe88 100644
--- a/src/soc/amd/stoneyridge/gpio.c
+++ b/src/soc/amd/stoneyridge/gpio.c
@@ -162,7 +162,7 @@ void gpio_set(gpio_t gpio_num, int value)
reg = read32((void *)gpio_address);
reg &= ~GPIO_OUTPUT_MASK;
reg |= !!value << GPIO_OUTPUT_SHIFT;
- write32((void *)(uintptr_t)gpio_address, reg);
+ write32((void *)gpio_address, reg);
}
void gpio_input_pulldown(gpio_t gpio_num)
@@ -173,7 +173,7 @@ void gpio_input_pulldown(gpio_t gpio_num)
reg = read32((void *)gpio_address);
reg &= ~GPIO_PULLUP_ENABLE;
reg |= GPIO_PULLDOWN_ENABLE;
- write32((void *)(uintptr_t)gpio_num, reg);
+ write32((void *)gpio_address, reg);
}
void gpio_input_pullup(gpio_t gpio_num)
@@ -184,7 +184,7 @@ void gpio_input_pullup(gpio_t gpio_num)
reg = read32((void *)gpio_address);
reg &= ~GPIO_PULLDOWN_ENABLE;
reg |= GPIO_PULLUP_ENABLE;
- write32((void *)(uintptr_t)gpio_num, reg);
+ write32((void *)gpio_address, reg);
}
void gpio_input(gpio_t gpio_num)
@@ -194,7 +194,7 @@ void gpio_input(gpio_t gpio_num)
reg = read32((void *)gpio_address);
reg &= ~GPIO_OUTPUT_ENABLE;
- write32((void *)(uintptr_t)gpio_num, reg);
+ write32((void *)gpio_address, reg);
}
void gpio_output(gpio_t gpio_num, int value)
@@ -204,7 +204,7 @@ void gpio_output(gpio_t gpio_num, int value)
reg = read32((void *)gpio_address);
reg |= GPIO_OUTPUT_ENABLE;
- write32((void *)(uintptr_t)gpio_num, reg);
+ write32((void *)gpio_address, reg);
gpio_set(gpio_num, value);
}