emif_data
struct emif_data *emif;
struct emif_data *emif = s->private;
struct emif_data *emif = platform_get_drvdata(pdev);
struct emif_data *emif = platform_get_drvdata(pdev);
struct emif_data *emif = s->private;
static void emif_debugfs_init(struct emif_data *emif)
static void emif_debugfs_exit(struct emif_data *emif)
static u32 get_emif_bus_width(struct emif_data *emif)
static void set_lpmode(struct emif_data *emif, u8 lpmode)
struct emif_data *emif;
static u32 get_pwr_mgmt_ctrl(u32 freq, struct emif_data *emif, u32 ip_rev)
static void get_temperature_level(struct emif_data *emif)
static void setup_temperature_sensitive_regs(struct emif_data *emif,
static irqreturn_t handle_temp_alert(void __iomem *base, struct emif_data *emif)
struct emif_data *emif = dev_id;
struct emif_data *emif = dev_id;
static void clear_all_interrupts(struct emif_data *emif)
static void disable_and_clear_all_interrupts(struct emif_data *emif)
static int setup_interrupts(struct emif_data *emif, u32 irq)
static void emif_onetime_settings(struct emif_data *emif)
static struct emif_data *emif1;
static void do_emif_regdump_show(struct seq_file *s, struct emif_data *emif,
static void get_default_timings(struct emif_data *emif)
struct emif_data *emif)
static struct emif_data *of_get_memory_device_details(
struct emif_data *emif = NULL;
emif = devm_kzalloc(dev, sizeof(struct emif_data), GFP_KERNEL);
static struct emif_data *get_device_details(
struct emif_data *emif = NULL;
emif_data->ti_emif_sram_data_phys =
gen_pool_virt_to_phys(emif_data->sram_pool_data,
emif_data->ti_emif_sram_data_virt);
emif_data->pm_functions.save_context =
sram_suspend_address(emif_data,
emif_data->pm_functions.enter_sr =
sram_suspend_address(emif_data,
emif_data->pm_functions.abort_sr =
sram_suspend_address(emif_data,
emif_data->pm_functions.restore_context =
sram_resume_address(emif_data,
emif_data->pm_functions.exit_sr =
sram_resume_address(emif_data,
emif_data->pm_functions.run_hw_leveling =
sram_resume_address(emif_data,
emif_data->pm_data.regs_virt =
(struct emif_regs_amx3 *)emif_data->ti_emif_sram_data_virt;
emif_data->pm_data.regs_phys = emif_data->ti_emif_sram_data_phys;
gen_pool_free(emif_data->sram_pool_code, emif_data->ti_emif_sram_virt,
static int ti_emif_push_sram(struct device *dev, struct ti_emif_data *emif_data)
copy_addr = sram_exec_copy(emif_data->sram_pool_code,
(void *)emif_data->ti_emif_sram_virt,
data_addr = sram_suspend_address(emif_data,
copy_addr = sram_exec_copy(emif_data->sram_pool_code,
&emif_data->pm_data,
sizeof(emif_data->pm_data));
static void ti_emif_configure_sr_delay(struct ti_emif_data *emif_data)
(emif_data->pm_data.ti_emif_base_addr_virt +
(emif_data->pm_data.ti_emif_base_addr_virt +
struct ti_emif_data *emif_data;
emif_data = devm_kzalloc(dev, sizeof(*emif_data), GFP_KERNEL);
if (!emif_data)
emif_data->pm_data.ti_emif_sram_config = (unsigned long) device_get_match_data(&pdev->dev);
emif_data->pm_data.ti_emif_base_addr_virt = devm_platform_get_and_ioremap_resource(pdev,
if (IS_ERR(emif_data->pm_data.ti_emif_base_addr_virt)) {
ret = PTR_ERR(emif_data->pm_data.ti_emif_base_addr_virt);
emif_data->pm_data.ti_emif_base_addr_phys = res->start;
ti_emif_configure_sr_delay(emif_data);
ret = ti_emif_alloc_sram(dev, emif_data);
ret = ti_emif_push_sram(dev, emif_data);
emif_instance = emif_data;
ti_emif_free_sram(emif_data);
struct ti_emif_data *emif_data = emif_instance;
ti_emif_free_sram(emif_data);
static u32 sram_suspend_address(struct ti_emif_data *emif_data,
return (emif_data->ti_emif_sram_virt +
static phys_addr_t sram_resume_address(struct ti_emif_data *emif_data,
return ((unsigned long)emif_data->ti_emif_sram_phys +
static void ti_emif_free_sram(struct ti_emif_data *emif_data)
gen_pool_free(emif_data->sram_pool_code, emif_data->ti_emif_sram_virt,
gen_pool_free(emif_data->sram_pool_data,
emif_data->ti_emif_sram_data_virt,
struct ti_emif_data *emif_data)
emif_data->sram_pool_code = of_gen_pool_get(np, "sram", 0);
if (!emif_data->sram_pool_code) {
emif_data->ti_emif_sram_virt =
gen_pool_alloc(emif_data->sram_pool_code,
if (!emif_data->ti_emif_sram_virt) {
emif_data->ti_emif_sram_phys =
gen_pool_virt_to_phys(emif_data->sram_pool_code,
emif_data->ti_emif_sram_virt);
emif_data->sram_pool_data = of_gen_pool_get(np, "sram", 1);
if (!emif_data->sram_pool_data) {
emif_data->ti_emif_sram_data_virt =
gen_pool_alloc(emif_data->sram_pool_data,
if (!emif_data->ti_emif_sram_data_virt) {