scripts: socfpga: add coccinelle magic
Use coccinelle to cleanup the imported u-boot code some more. This will remove: - debugging macros (TCL_RPT, BFM_STAGE, ALTERA_ASSERT) - empty if/else/for blocks resulting from macro deletion - some unused functions (scc_mgr_xxx) Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
e9cd1542cc
commit
093dd1e7be
|
@ -0,0 +1,93 @@
|
|||
@r_shadow@
|
||||
@@
|
||||
|
||||
- ...curr_shadow_reg = 0;
|
||||
|
||||
@r_out2_delay@
|
||||
type T;
|
||||
@@
|
||||
|
||||
- T scc_mgr_apply_group_dq_out2_delay(...)
|
||||
- {
|
||||
- ...
|
||||
- }
|
||||
|
||||
@r_oct_out2@
|
||||
type T;
|
||||
@@
|
||||
- T scc_mgr_apply_group_dqs_io_and_oct_out2(...)
|
||||
- {
|
||||
- ...
|
||||
- }
|
||||
|
||||
@r_oct_out2_gradual@
|
||||
type T;
|
||||
@@
|
||||
|
||||
- T scc_mgr_set_group_dqs_io_and_oct_out2_gradual(...)
|
||||
- {
|
||||
- ...
|
||||
- }
|
||||
|
||||
@r_eye_diag@
|
||||
type T;
|
||||
@@
|
||||
|
||||
- T rw_mgr_mem_calibrate_eye_diag_aid(...)
|
||||
- {
|
||||
- ...
|
||||
- }
|
||||
|
||||
@r_full_test@
|
||||
type T;
|
||||
@@
|
||||
|
||||
- T rw_mgr_mem_calibrate_full_test(...)
|
||||
- {
|
||||
- ...
|
||||
- }
|
||||
|
||||
@r_user_init_cal_req@
|
||||
@@
|
||||
|
||||
- static void user_init_cal_req (...)
|
||||
- {
|
||||
- ...
|
||||
- }
|
||||
|
||||
@r_tcl@
|
||||
@@
|
||||
|
||||
- TCLRPT_SET(...);
|
||||
|
||||
@r_bfm@
|
||||
@@
|
||||
|
||||
- BFM_STAGE(...);
|
||||
|
||||
@r_trace@
|
||||
@@
|
||||
|
||||
- TRACE_FUNC(...);
|
||||
|
||||
@r_assert@
|
||||
@@
|
||||
|
||||
- ALTERA_ASSERT(...);
|
||||
|
||||
@r_if@
|
||||
@@
|
||||
|
||||
- if (...) {}
|
||||
|
||||
@r_if_else@
|
||||
@@
|
||||
|
||||
- if (...) {
|
||||
- } else {
|
||||
- }
|
||||
|
||||
@r_for@
|
||||
@@
|
||||
|
||||
- for (...;...;...) {}
|
|
@ -46,6 +46,9 @@ copy_source() {
|
|||
|
||||
echo " Automated readability fixup..."
|
||||
indent -npro -kr -i8 -ts8 -sob -l100 -ss -ncs -cp1 -il0 $tgt
|
||||
|
||||
echo " Running coccinelle cleanups..."
|
||||
spatch -sp_file scripts/coccinelle/misc/altera_sequencer.cocci -in_place arch/arm/mach-socfpga/include/mach
|
||||
}
|
||||
|
||||
copy_source ${ubootsrc}/board/altera/socfpga/sdram/sequencer.c arch/arm/mach-socfpga/include/mach/sequencer.c
|
||||
|
|
Loading…
Reference in New Issue