Skip to content

Commit

Permalink
Use base addresses defined in carfield_params.h for drivers.
Browse files Browse the repository at this point in the history
  • Loading branch information
Yvan Tortorella committed Aug 30, 2024
1 parent 452e227 commit 9d1c62b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions sw/include/car_memory_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,22 +189,21 @@ extern void *__base_l2;
#define TCTM_STREAMER_APB_TX_BUFFER_BASE CAR_STREAMER_APB_BASE_ADDR + TCTM_STREAMER_TX_BUFFER_OFFS

// FLL
#define FLL_BASE_ADDRESS 0x21003000
#define FLL_ADDR_SPACE 0x20
#define FLL_HOST_ID 0x0
#define FLL_PERIPH_ID 0x1
#define FLL_ALT_ID 0x2
#define FLL_SECD_ID 0x3
#define FLL_RT_ID 0x4
#define FLL_BASE_ADDRESS(id) (FLL_BASE_ADDRESS + (id)*FLL_ADDR_SPACE)
#define FLL_BASE_ADDRESS(id) (fll + (id)*FLL_ADDR_SPACE)

#define FLL_STATUS_REG_I 0x00
#define FLL_CONFIG_REG_I 0x08
#define FLL_CONFIG_REG_II 0x10
#define FLL_INTEGR_REG 0x18

// Padframe
#define PADFRAME_BASE_ADDRESS 0x21000000
#define PADFRAME_BASE_ADDRESS padframe

#define PADFRAME_CONFIG_INFO 0x0
#define PADFRAME_CONFIG_MUXED_V_00_CFG 0x4
Expand Down
5 changes: 2 additions & 3 deletions sw/include/fll.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
#ifndef __FLL_H
#define __FLL_H

#include "io.h"
#include "car_memory_map.h"
#include "car_util.h"

#define FLL_DCO_CODE_MASK (0x03FF0000)
#define FLL_CLK_DIV_MASK (0x3C000000)
Expand Down Expand Up @@ -61,4 +60,4 @@ void set_fll_clk_mul(uint32_t clk_mul, uint8_t fll_id){
write_fll_bitfield(clk_mul, fll_id, FLL_CONFIG_REG_I, FLL_CLK_MUL_MASK, FLL_CLK_MUL_OFFSET);
}

#endif /*__FLL_H*/
#endif /*__FLL_H*/

0 comments on commit 9d1c62b

Please sign in to comment.