Commit 68baa53f authored by Alessandro Rubini's avatar Alessandro Rubini

various: add some 'static', save 100 bytes

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 1704a668
......@@ -31,14 +31,14 @@ static int autoneg_enabled;
volatile struct EP_WB *EP;
/* functions for accessing PCS (MDIO) registers */
uint16_t pcs_read(int location)
static uint16_t pcs_read(int location)
{
EP->MDIO_CR = EP_MDIO_CR_ADDR_W(location >> 2);
while ((EP->MDIO_ASR & EP_MDIO_ASR_READY) == 0) ;
return EP_MDIO_ASR_RDATA_R(EP->MDIO_ASR) & 0xffff;
}
void pcs_write(int location, int value)
static void pcs_write(int location, int value)
{
EP->MDIO_CR = EP_MDIO_CR_ADDR_W(location >> 2)
| EP_MDIO_CR_DATA_W(value)
......
......@@ -44,7 +44,7 @@ int uart_write_string(const char *s)
int puts(const char *s) __attribute__((alias("uart_write_string")));
int uart_poll()
static int uart_poll()
{
return uart->SR & UART_SR_RX_RDY;
}
......
......@@ -29,7 +29,4 @@ int ep_cal_pattern_disable();
void pfilter_init_default();
uint16_t pcs_read(int location);
void pcs_write(int location, int value);
#endif
......@@ -40,7 +40,7 @@ int32_t sfp_deltaTx = 46407;
int32_t sfp_deltaRx = 167843;
uint32_t cal_phase_transition = 2389;
void wrc_initialize()
static void wrc_initialize()
{
uint8_t mac_addr[6];
......@@ -89,7 +89,7 @@ void wrc_initialize()
#define LINK_UP 3
#define LINK_DOWN 4
int wrc_check_link()
static int wrc_check_link()
{
static int prev_link_state = -1;
int link_state = ep_link_up(NULL);
......@@ -152,7 +152,7 @@ static void ui_update()
extern uint32_t _endram;
#define ENDRAM_MAGIC 0xbadc0ffe
void check_stack(void)
static void check_stack(void)
{
while (_endram != ENDRAM_MAGIC) {
mprintf("Stack overflow!\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