X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=include%2Fshared%2Fhw.h;h=c59e5af511d01554123f4a2b9f6a56f96f0108fc;hb=bc34256feba138ce10f3f8ad320b84816a5c5926;hp=e15885d6f5763c81927078d00ac34e199b620e52;hpb=650c1c98be6dfeca43626acf618789e048c3da77;p=carl9170fw.git diff --git a/include/shared/hw.h b/include/shared/hw.h index e15885d..c59e5af 100644 --- a/include/shared/hw.h +++ b/include/shared/hw.h @@ -1,7 +1,7 @@ /* - * Atheros AR9170 driver + * Shared Atheros AR9170 Header * - * Hardware-specific definitions + * Register map, hardware-specific definitions * * Copyright 2008, Johannes Berg * Copyright 2009, 2010, Christian Lamparter @@ -650,7 +650,11 @@ #define AR9170_CAM_MAX_USER 64 #define AR9170_CAM_MAX_KEY_LENGTH 16 -#define AR9170_PRAM_OFFSET 0x200000 +#define AR9170_SRAM_OFFSET 0x100000 +#define AR9170_SRAM_SIZE 0x18000 + +#define AR9170_PRAM_OFFSET 0x200000 +#define AR9170_PRAM_SIZE 0x8000 enum cpu_clock { AHB_STATIC_40MHZ = 0, @@ -708,7 +712,8 @@ struct ar9170_stream { __le16 tag; u8 payload[0]; -}; +} __packed __aligned(4); +#define AR9170_STREAM_LEN 4 #define AR9170_MAX_ACKTABLE_ENTRIES 8 #define AR9170_MAX_VIRTUAL_MAC 7 @@ -727,6 +732,9 @@ struct ar9170_stream { #define SET_VAL(reg, value, newvalue) \ (value = ((value) & ~reg) | (((newvalue) << reg##_S) & reg)) +#define SET_CONSTVAL(reg, newvalue) \ + (((newvalue) << reg##_S) & reg) + #define MOD_VAL(reg, value, newvalue) \ (((value) & ~reg) | (((newvalue) << reg##_S) & reg)) #endif /* __CARL9170_SHARED_HW_H */