Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset f942226e in mainline


Ignore:
Timestamp:
2013-02-14T23:02:56Z (9 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master
Children:
fe6593b7
Parents:
2e55443
Message:

Fix macro to return the value of a register, not the address.

Location:
kernel/genarch/include/drivers/am335x
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/genarch/include/drivers/am335x/ctrl_module.h

    r2e55443 rf942226e  
    4949am335x_ctrl_module_clock_freq_get(am335x_ctrl_module_t *base, unsigned *freq)
    5050{
    51         unsigned const control_status = *AM335x_CTRL_MODULE_REG_ADDR(base,
     51        unsigned const control_status = AM335x_CTRL_MODULE_REG_VALUE(base,
    5252            CONTROL_STATUS);
    5353        unsigned const sysboot1 = (control_status >> 22) & 0x03;
  • kernel/genarch/include/drivers/am335x/ctrl_module_regs.h

    r2e55443 rf942226e  
    3939#include <typedefs.h>
    4040
    41 #define AM335x_CTRL_MODULE_REG_ADDR(base, name) \
    42             ((ioport32_t *)(AM335x_CTRL_MODULE_##name##_OFFSET + \
    43             ((ioport8_t *) base)))
     41#define AM335x_CTRL_MODULE_REG_VALUE(base, name) \
     42            (*((ioport32_t *)(AM335x_CTRL_MODULE_##name##_OFFSET + \
     43            ((ioport8_t *) base))))
    4444
    4545#define AM335x_CTRL_MODULE_CONTROL_REVISION_OFFSET          0x00
Note: See TracChangeset for help on using the changeset viewer.