drivers/ddr/fsl_ddr: Make SR_IE configurable
authorJoakim Tjernlund <joakim.tjernlund@transmode.se>
Wed, 14 Oct 2015 14:32:00 +0000 (16:32 +0200)
committerYork Sun <yorksun@freescale.com>
Fri, 30 Oct 2015 16:19:41 +0000 (09:19 -0700)
SR_IE(Self-refresh interrupt enable) is needed for
Hardware Based Self-Refresh. Make it configurable and let
board code handle the rest.

Signed-off-by: Joakim Tjernlund <joakim.tjernlund@transmode.se>
Reviewed-by: York Sun <yorksun@freescale.com>
drivers/ddr/fsl/ctrl_regs.c
include/fsl_ddr_sdram.h

index 8367c95cf82ba9e9fb0d268afbb17d717c99d0ef..8543679108751b1597137ecc8e859226d71fdb9b 100644 (file)
@@ -858,7 +858,7 @@ static void set_ddr_sdram_cfg_2(const unsigned int ctrl_num,
                        break;
                }
        }
-
+       sr_ie = popts->self_refresh_interrupt_en;
        num_pr = 1;     /* Make this configurable */
 
        /*
index e5b6e03c8fd7a569d07045270f32adef4528e0f1..c79fce089826f65cc6a5aa7ceddc3d6ab63e30d4 100644 (file)
@@ -324,6 +324,8 @@ typedef struct memctl_options_s {
        unsigned int dqs_config;        /* Use DQS? maybe only with DDR2? */
        /* SREN - self-refresh during sleep */
        unsigned int self_refresh_in_sleep;
+       /* SR_IE - Self-refresh interrupt enable */
+       unsigned int self_refresh_interrupt_en;
        unsigned int dynamic_power;     /* DYN_PWR */
        /* memory data width to use (16-bit, 32-bit, 64-bit) */
        unsigned int data_bus_width;