diff options
author | Mayuresh Kulkarni <mkulkarni@nvidia.com> | 2011-03-31 16:51:00 +0530 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:42:01 -0800 |
commit | c5ad557e62241b81cc7bf2c3efa57a3af519f3ac (patch) | |
tree | 022a407e43824a332d251c8e8e70fdaa6595c005 /arch/arm/mach-tegra/tegra2_mc.h | |
parent | 1f828538e7cb3b17bdcc1851091eabc5026d0eb9 (diff) |
arm: tegra: emc: change interface to calculate bandwidth
- resurrect the support for -group argument from user space. this causes
round robin sampling of client's band-width in a group
- pass current emc frequency to user space so that number of clock ticks
used in band-width calculation is correct
for bug 759918
Original-Change-Id: Ifbfccd3cb761253a1dd3253ce40fb92d9d9bb20c
Signed-off-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Reviewed-on: http://git-master/r/24929
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Rebase-Id: R625be9d46e35ffd77d50a055235469127c443b84
Diffstat (limited to 'arch/arm/mach-tegra/tegra2_mc.h')
-rw-r--r-- | arch/arm/mach-tegra/tegra2_mc.h | 59 |
1 files changed, 19 insertions, 40 deletions
diff --git a/arch/arm/mach-tegra/tegra2_mc.h b/arch/arm/mach-tegra/tegra2_mc.h index 41589b8e986a..211213c5f585 100644 --- a/arch/arm/mach-tegra/tegra2_mc.h +++ b/arch/arm/mach-tegra/tegra2_mc.h @@ -47,6 +47,7 @@ typedef enum { #define MC_STAT_EMC_ADDR_LOW_0 0x98 #define MC_STAT_EMC_ADDR_HIGH_0 0x9c #define MC_STAT_EMC_CLOCK_LIMIT_0 0xa0 +#define MC_STAT_EMC_CLOCKS_0 0xa4 #define MC_STAT_EMC_CONTROL_0_0 0xa8 #define MC_STAT_EMC_COUNT_0_0 0xb8 #define MC_STAT_EMC_COUNT_1_0 0xbc @@ -142,60 +143,38 @@ typedef enum { #define EMC_STAT_DRAM_DEV1_NO_BANKS_ACTIVE_CKE_EQ0_LO_0 0x25c #define EMC_STAT_DRAM_DEV1_NO_BANKS_ACTIVE_CKE_EQ0_HI_0 0x260 +#pragma pack(push) +#pragma pack(1) + +typedef struct { + u32 signature; + u32 client_number; + u32 client_counts; + u32 total_counts; + u32 emc_clock_rate; +} sample_data_t; + +#pragma pack(pop) + typedef struct tegra_mc_counter { - /* constants during sampling */ bool enabled; - bool reschedule; u32 period; FILTER_MODE mode; u32 address_low; - u32 address_length_1; /* This represents (length - 1) */ - u32 address_window_size_1; /* This represents (size - 1) */ - u8 client_number; + u32 address_length; + u32 current_client_index; + u32 total_clients; u8 clients[MC_COUNTER_CLIENT_SIZE]; - - /* variables during sampling */ - bool address_range_change; - u32 current_address_low; - u32 current_address_high; - u32 value; - u8 current_client; - u32 sample_count; + sample_data_t sample_data; } tegra_mc_counter_t; typedef struct tegra_emc_dram_counter { - /* constants during sampling */ bool enabled; u8 device_mask; - /* variables during sampling */ - u32 value; + sample_data_t sample_data; } tegra_emc_dram_counter_t; -#pragma pack(push) -#pragma pack(1) -#define LOG_EVENT_NUMBER_MAX 16 -#define MILLISECONDS_TO_TIME_QUANTUM 10 -typedef struct { - u16 time_quantum; - u16 event_state_change; -} log_header_t; - -typedef struct { - struct _word0 { - u32 enabled : 1; /* 0:0 */ - u32 address_range_change : 1; /* 1:1 */ - u32 reserved1 : 2; /* 3:2 */ - u32 event_id : 8; /* 11:4 */ - u32 address_range_low_pfn : 20; /* 31:12 */ - } word0; - struct _word1 { - u32 address_range_length_pfn : 20; /* 19:0 */ - u32 reserved1 : 12; /* 31:20 */ - } word1; -} log_event_t; -#pragma pack(pop) - /* client ids of mc/emc */ typedef enum { MC_STAT_BEGIN = 0, |