Browse Source

target: don't implicitly include "algorithm.h"

Most files in the tree seem to have ended up including this,
and *quite* needlessly ... only code implementing or using
downloadable algorithms actually needs these declarations.

So take it out of the header files which included it, and put
it in files which use it ... reduce needless interdependencies.

Also: "algorithm.h" doesn't need to include "types.h" again;
it already comes from a different header.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
tags/v0.4.0-rc1
David Brownell 14 years ago
parent
commit
db094c2e60
16 changed files with 18 additions and 5 deletions
  1. +1
    -0
      src/flash/aduc702x.c
  2. +3
    -2
      src/flash/arm_nandio.c
  3. +1
    -0
      src/flash/cfi.c
  4. +1
    -0
      src/flash/ecos.c
  5. +1
    -0
      src/flash/lpc2000.c
  6. +1
    -0
      src/flash/lpc2900.c
  7. +1
    -0
      src/flash/stellaris.c
  8. +1
    -0
      src/flash/stm32x.c
  9. +1
    -0
      src/flash/str7x.c
  10. +1
    -0
      src/flash/str9x.c
  11. +0
    -2
      src/target/algorithm.h
  12. +1
    -0
      src/target/arm11.c
  13. +1
    -0
      src/target/arm7_9_common.c
  14. +1
    -0
      src/target/armv4_5.c
  15. +1
    -0
      src/target/armv7m.c
  16. +2
    -1
      src/target/target.h

+ 1
- 0
src/flash/aduc702x.c View File

@@ -27,6 +27,7 @@
#include "armv4_5.h"
#include "binarybuffer.h"
#include "time_support.h"
#include "algorithm.h"


static int aduc702x_build_sector_list(struct flash_bank *bank);


+ 3
- 2
src/flash/arm_nandio.c View File

@@ -26,6 +26,7 @@

#include "arm_nandio.h"
#include "armv4_5.h"
#include "algorithm.h"


/*
@@ -43,8 +44,8 @@ int arm_nandwrite(struct arm_nand_data *nand, uint8_t *data, int size)
{
struct target *target = nand->target;
struct armv4_5_algorithm algo;
struct arm *armv4_5 = target->arch_info;
struct reg_param reg_params[3];
struct arm *armv4_5 = target->arch_info;
struct reg_param reg_params[3];
uint32_t target_buf;
uint32_t exit = 0;
int retval;


+ 1
- 0
src/flash/cfi.c View File

@@ -27,6 +27,7 @@
#include "non_cfi.h"
#include "armv4_5.h"
#include "binarybuffer.h"
#include "algorithm.h"


#define CFI_MAX_BUS_WIDTH 4


+ 1
- 0
src/flash/ecos.c View File

@@ -24,6 +24,7 @@
#include "flash.h"
#include "embeddedice.h"
#include "image.h"
#include "algorithm.h"


#if 0


+ 1
- 0
src/flash/lpc2000.c View File

@@ -29,6 +29,7 @@
#include "armv4_5.h"
#include "armv7m.h"
#include "binarybuffer.h"
#include "algorithm.h"


/* flash programming support for NXP LPC17xx and LPC2xxx devices


+ 1
- 0
src/flash/lpc2900.c View File

@@ -27,6 +27,7 @@
#include "flash.h"
#include "binarybuffer.h"
#include "armv4_5.h"
#include "algorithm.h"


/* 1024 bytes */


+ 1
- 0
src/flash/stellaris.c View File

@@ -31,6 +31,7 @@
#include "stellaris.h"
#include "armv7m.h"
#include "binarybuffer.h"
#include "algorithm.h"


#define DID0_VER(did0) ((did0 >> 28)&0x07)


+ 1
- 0
src/flash/stm32x.c View File

@@ -27,6 +27,7 @@
#include "stm32x.h"
#include "armv7m.h"
#include "binarybuffer.h"
#include "algorithm.h"


static int stm32x_mass_erase(struct flash_bank *bank);


+ 1
- 0
src/flash/str7x.c View File

@@ -27,6 +27,7 @@
#include "str7x.h"
#include "armv4_5.h"
#include "binarybuffer.h"
#include "algorithm.h"


struct str7x_mem_layout mem_layout_str7bank0[] = {


+ 1
- 0
src/flash/str9x.c View File

@@ -29,6 +29,7 @@

#include "str9x.h"
#include "arm966e.h"
#include "algorithm.h"


static uint32_t bank1start = 0x00080000;


+ 0
- 2
src/target/algorithm.h View File

@@ -20,8 +20,6 @@
#ifndef ALGORITHM_H
#define ALGORITHM_H

#include "types.h"

enum param_direction
{
PARAM_IN,


+ 1
- 0
src/target/arm11.c View File

@@ -33,6 +33,7 @@
#include "arm_simulator.h"
#include "time_support.h"
#include "target_type.h"
#include "algorithm.h"


#if 0


+ 1
- 0
src/target/arm7_9_common.c View File

@@ -36,6 +36,7 @@
#include "arm7_9_common.h"
#include "time_support.h"
#include "arm_simulator.h"
#include "algorithm.h"


/**


+ 1
- 0
src/target/armv4_5.c View File

@@ -31,6 +31,7 @@
#include "breakpoints.h"
#include "arm_disassembler.h"
#include "binarybuffer.h"
#include "algorithm.h"


char* armv4_5_core_reg_list[] =


+ 1
- 0
src/target/armv7m.c View File

@@ -36,6 +36,7 @@

#include "breakpoints.h"
#include "armv7m.h"
#include "algorithm.h"

#define ARRAY_SIZE(x) ((int)(sizeof(x)/sizeof((x)[0])))



+ 2
- 1
src/target/target.h View File

@@ -28,7 +28,6 @@

#include <stddef.h>

#include "algorithm.h"
#include "command.h"

struct reg;
@@ -36,6 +35,8 @@ struct trace;
struct command_context;
struct breakpoint;
struct watchpoint;
struct mem_param;
struct reg_param;


/**


Loading…
Cancel
Save